diff options
| author | Noam Postavsky | 2016-11-29 18:56:08 -0500 |
|---|---|---|
| committer | Noam Postavsky | 2016-11-29 18:59:02 -0500 |
| commit | a283d655db88cdcc8cb53d8e2578e1cdf751c84b (patch) | |
| tree | f0343ebdba754dd88713da7eb22aad57b0b17d13 /lisp/vc/diff-mode.el | |
| parent | 61c6a10e3110490dadac4577cc540053341ff25c (diff) | |
| download | emacs-a283d655db88cdcc8cb53d8e2578e1cdf751c84b.tar.gz emacs-a283d655db88cdcc8cb53d8e2578e1cdf751c84b.zip | |
Fix previous commit
* lisp/vc/diff-mode.el (diff-refine-hunk): Make sure to go to beginning
of hunk before calling `diff-hunk-style'.
Diffstat (limited to 'lisp/vc/diff-mode.el')
| -rw-r--r-- | lisp/vc/diff-mode.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 6ddadb3c239..5b48c8d93df 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el | |||
| @@ -2065,14 +2065,13 @@ For use in `add-log-current-defun-function'." | |||
| 2065 | (require 'smerge-mode) | 2065 | (require 'smerge-mode) |
| 2066 | (save-excursion | 2066 | (save-excursion |
| 2067 | (let* ((hunk-bounds (diff-bounds-of-hunk)) | 2067 | (let* ((hunk-bounds (diff-bounds-of-hunk)) |
| 2068 | (style (diff-hunk-style)) ;Skips the hunk header as well. | 2068 | (style (progn (goto-char (car hunk-bounds)) |
| 2069 | (diff-hunk-style))) ;Skips the hunk header as well. | ||
| 2069 | (beg (point)) | 2070 | (beg (point)) |
| 2071 | (end (cadr hunk-bounds)) | ||
| 2070 | (props-c '((diff-mode . fine) (face diff-refine-changed))) | 2072 | (props-c '((diff-mode . fine) (face diff-refine-changed))) |
| 2071 | (props-r '((diff-mode . fine) (face diff-refine-removed))) | 2073 | (props-r '((diff-mode . fine) (face diff-refine-removed))) |
| 2072 | (props-a '((diff-mode . fine) (face diff-refine-added))) | 2074 | (props-a '((diff-mode . fine) (face diff-refine-added)))) |
| 2073 | ;; Be careful to go back to `start' so diff-end-of-hunk gets | ||
| 2074 | ;; to read the hunk header's line info. | ||
| 2075 | (end (goto-char (cadr hunk-bounds)))) | ||
| 2076 | 2075 | ||
| 2077 | (remove-overlays beg end 'diff-mode 'fine) | 2076 | (remove-overlays beg end 'diff-mode 'fine) |
| 2078 | 2077 | ||