# HG changeset patch # User Oleksandr Gavenko # Date 1601581367 -10800 # Node ID f2f0db6154f3d5b168a0c37001530bb5454b94ef # Parent 3bc716b96e3c53773b7ee73f0c48b6df103668ec Fixed template insertion when on the last line without final newline. diff -r 3bc716b96e3c -r f2f0db6154f3 contrib/gadialog.el --- a/contrib/gadialog.el Thu Oct 01 22:29:18 2020 +0300 +++ b/contrib/gadialog.el Thu Oct 01 22:42:47 2020 +0300 @@ -60,6 +60,7 @@ (forward-line 1)) (unless (re-search-forward "^# " (+ (point) 10240) t) (goto-char (point-max))) + (when (eobp) (insert-char ?\n)) (forward-line 0) (gadialog-cleaup-whitespaces-forward) (insert "\n# ")