1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

* lisp/vc/diff-mode.el (diff-revert-and-kill-hunk): Fix finding END.

This commit is contained in:
Sean Whitton 2025-12-05 17:05:47 +00:00
parent 5e7a71d0f4
commit 022facd986

View file

@ -2304,7 +2304,8 @@ BEG and END."
(goto-char beg)
(setq beg (car (diff-bounds-of-hunk)))
(goto-char end)
(setq end (cadr (diff-bounds-of-hunk))))
(unless (looking-at diff-hunk-header-re)
(setq end (cadr (diff-bounds-of-hunk)))))
(pcase-setq `(,beg ,end) (diff-bounds-of-hunk)))
(when (null (diff-apply-buffer beg end t))
;; Use `diff-hunk-kill' because it properly handles file headers.