summaryrefslogtreecommitdiff
path: root/lisp/vc/diff-mode.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-10-23 14:40:23 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-10-23 14:40:23 -0400
commit9c3e39f3ff724fdd0e622a8fde608e6346991346 (patch)
tree05bbfdfcfa685845c47ed8c1888a05cc3879ba21 /lisp/vc/diff-mode.el
parenta6709bc70c1ddde8f31c1470f06d39f67976d68d (diff)
downloademacs-9c3e39f3ff724fdd0e622a8fde608e6346991346.tar.gz
* lisp/vc/diff-mode.el (diff-hunk): `save-excursion' while refining.
Fixes: debbugs:12671
Diffstat (limited to 'lisp/vc/diff-mode.el')
-rw-r--r--lisp/vc/diff-mode.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 0e79c962b47..cdcc7ca4745 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -581,8 +581,9 @@ next hunk if TRY-HARDER is non-nil; otherwise signal an error."
(with-local-quit
(when (buffer-live-p buffer)
(with-current-buffer buffer
- (goto-char point)
- (diff-refine-hunk))))))))))
+ (save-excursion
+ (goto-char point)
+ (diff-refine-hunk)))))))))))
(easy-mmode-define-navigation
diff-file diff-file-header-re "file" diff-end-of-file)