diff options
author | yoctocell <public@yoctocell.xyz> | 2021-01-04 16:01:54 +0100 |
---|---|---|
committer | yoctocell <public@yoctocell.xyz> | 2021-01-04 16:01:54 +0100 |
commit | c3a39c6a62a1fda0723832e50217fab8f534f5d0 (patch) | |
tree | c95b0103fe3f244f832bd6d3ed359fb2874f9b64 | |
parent | b26512fb434a7aad95037b8a723119e295c7633e (diff) |
Retain the cursor position after inserting diff
Put the cursor at the beginning of the body of the message instead of at
the end.
* git-email.el (git-email--compose-email):
-rw-r--r-- | git-email.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git-email.el b/git-email.el index 2bfe675..0ddf93d 100644 --- a/git-email.el +++ b/git-email.el @@ -210,7 +210,8 @@ them into the message buffer." ;; (let ((body (or (re-search-forward "<#part .*>") ;; (re-search-forward "--text follows this line--")))) (goto-char (point-max)) - (insert diff))) + (save-excursion + (insert diff)))) (provide 'git-email) |