1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

diff-apply-hunk: Don't display BUF in the selected window

* lisp/vc/diff-mode.el (diff-apply-hunk): Don't display BUF in
the selected window.
This commit is contained in:
Sean Whitton 2025-11-14 13:00:13 +00:00
parent a40d8885f8
commit 0d4741ec92

View file

@ -2197,7 +2197,9 @@ With a prefix argument, REVERSE the hunk."
(delete-region (car pos) (cdr pos))
(insert (car new)))
;; Display BUF in a window
(set-window-point (display-buffer buf) (+ (car pos) (cdr new)))
(let ((display-buffer-overriding-action
'(nil (inhibit-same-window . t))))
(set-window-point (display-buffer buf) (+ (car pos) (cdr new))))
(diff-hunk-status-msg line-offset (xor switched reverse) nil)
(when diff-advance-after-apply-hunk
(diff-hunk-next))))))