summaryrefslogtreecommitdiff
path: root/lisp/vc/diff-mode.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2010-12-13 10:27:36 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2010-12-13 10:27:36 -0500
commitf49d1f52b2e368ef67dcfececd426de958548f4e (patch)
treece24ced92f2acc976daf4b69e3634c8bd600e44e /lisp/vc/diff-mode.el
parent07176b2a9e63a0d3933b167f987475d8a18da5cc (diff)
parent11aad4e9f9f54ce8e9ecc66347e512b20a3cdf39 (diff)
downloademacs-f49d1f52b2e368ef67dcfececd426de958548f4e.tar.gz
Merge from emacs-23
Diffstat (limited to 'lisp/vc/diff-mode.el')
-rw-r--r--lisp/vc/diff-mode.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index cec4fb24616..c16c2460e75 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -1829,10 +1829,13 @@ For use in `add-log-current-defun-function'."
(eval-and-compile (require 'smerge-mode))
(save-excursion
(diff-beginning-of-hunk 'try-harder)
- (let* ((style (diff-hunk-style)) ;Skips the hunk header as well.
+ (let* ((start (point))
+ (style (diff-hunk-style)) ;Skips the hunk header as well.
(beg (point))
(props '((diff-mode . fine) (face diff-refine-change)))
- (end (progn (diff-end-of-hunk) (point))))
+ ;; Be careful to go back to `start' so diff-end-of-hunk gets
+ ;; to read the hunk header's line info.
+ (end (progn (goto-char start) (diff-end-of-hunk) (point))))
(remove-overlays beg end 'diff-mode 'fine)