about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gitsum.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/gitsum.el b/gitsum.el
index 04e81d5..93038a7 100644
--- a/gitsum.el
+++ b/gitsum.el
@@ -62,6 +62,9 @@ A numeric argument serves as a repeat count."
       (insert "\n")
       (while (re-search-forward "^" nil t)
         (replace-match "# " nil nil))
+      (forward-line 0)
+      (forward-char -1)
+      (delete-region (point) (point-max))
       (goto-char (point-min)))
     (log-edit 'gitsum-do-commit nil nil buffer)))