aboutsummaryrefslogtreecommitdiff
path: root/git-email.el
diff options
context:
space:
mode:
authoryoctocell <public@yoctocell.xyz>2021-01-04 16:01:54 +0100
committeryoctocell <public@yoctocell.xyz>2021-01-04 16:01:54 +0100
commitc3a39c6a62a1fda0723832e50217fab8f534f5d0 (patch)
treec95b0103fe3f244f832bd6d3ed359fb2874f9b64 /git-email.el
parentb26512fb434a7aad95037b8a723119e295c7633e (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):
Diffstat (limited to 'git-email.el')
-rw-r--r--git-email.el3
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)