diff options
Diffstat (limited to 'lisp/diff-mode.el')
| -rw-r--r-- | lisp/diff-mode.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index f6b2520a112..d41bfcad58a 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el | |||
| @@ -305,7 +305,11 @@ when editing big diffs)." | |||
| 305 | (defvar diff-narrowed-to nil) | 305 | (defvar diff-narrowed-to nil) |
| 306 | 306 | ||
| 307 | (defun diff-end-of-hunk (&optional style) | 307 | (defun diff-end-of-hunk (&optional style) |
| 308 | (if (looking-at diff-hunk-header-re) (goto-char (match-end 0))) | 308 | (when (looking-at diff-hunk-header-re) |
| 309 | (unless style | ||
| 310 | ;; Especially important for unified (because headers are ambiguous). | ||
| 311 | (setq style (cdr (assq (char-after) '((?@ . unified) (?* . context)))))) | ||
| 312 | (goto-char (match-end 0))) | ||
| 309 | (let ((end (and (re-search-forward (case style | 313 | (let ((end (and (re-search-forward (case style |
| 310 | ;; A `unified' header is ambiguous. | 314 | ;; A `unified' header is ambiguous. |
| 311 | (unified (concat "^[^-+# \\]\\|" | 315 | (unified (concat "^[^-+# \\]\\|" |