diff options
| author | Dmitry Gutov | 2023-10-14 20:47:57 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2023-10-14 20:47:57 +0300 |
| commit | fe62315ef35c301d1fa0e1614d6bbbc83dbeef81 (patch) | |
| tree | d8200ea7860a571498bcf7ecccdd5d68c07008f6 | |
| parent | c0ffa8958eba358b6c8ad072912b1fcd5aa7dfa6 (diff) | |
| download | emacs-fe62315ef35c301d1fa0e1614d6bbbc83dbeef81.tar.gz emacs-fe62315ef35c301d1fa0e1614d6bbbc83dbeef81.zip | |
Fix vc-hg-log-edit-toggle-amend
* lisp/vc/log-edit.el (log-edit--toggle-amend): Handle the case
when the VCS returns log entry that doesn't end with a newline
(bug#66423).
| -rw-r--r-- | lisp/vc/log-edit.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 1e249c637a6..c77f4494c1a 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el | |||
| @@ -1219,7 +1219,10 @@ line of MSG." | |||
| 1219 | (let ((pt (point))) | 1219 | (let ((pt (point))) |
| 1220 | (and (zerop (forward-line 1)) | 1220 | (and (zerop (forward-line 1)) |
| 1221 | (looking-at "\n\\|\\'") | 1221 | (looking-at "\n\\|\\'") |
| 1222 | (let ((summary (buffer-substring-no-properties pt (1- (point))))) | 1222 | (let ((summary (buffer-substring-no-properties pt |
| 1223 | (if (bolp) | ||
| 1224 | (1- (point)) | ||
| 1225 | (point))))) | ||
| 1223 | (skip-chars-forward " \n") | 1226 | (skip-chars-forward " \n") |
| 1224 | (delete-region pt (point)) | 1227 | (delete-region pt (point)) |
| 1225 | (log-edit-set-header "Summary" summary))))))) | 1228 | (log-edit-set-header "Summary" summary))))))) |