* lisp/vc/diff-mode.el (diff-hunk): `save-excursion' while refining.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 23 Oct 2012 18:40:23 +0000 (14:40 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 23 Oct 2012 18:40:23 +0000 (14:40 -0400)
Fixes: debbugs:12671

lisp/ChangeLog
lisp/vc/diff-mode.el

index 2d3bd09..05b7cfc 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * vc/diff-mode.el (diff-hunk): `save-excursion' while refining
+       (bug#12671).
+
 2012-10-23  Glenn Morris  <rgm@gnu.org>
 
        * progmodes/gud.el (gud-menu-map):
index 0e79c96..cdcc7ca 100644 (file)
@@ -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)