summaryrefslogtreecommitdiff
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r--lisp/diff-mode.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 56bcde521ac..93a8a418806 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -546,7 +546,8 @@ If the prefix ARG is given, restrict the view to the current file instead."
(interactive)
(diff-beginning-of-hunk)
(let* ((start (point))
- (nexthunk (when (re-search-forward diff-hunk-header-re nil t)
+ ;; Search the second match, since we're looking at the first.
+ (nexthunk (when (re-search-forward diff-hunk-header-re nil t 2)
(match-beginning 0)))
(firsthunk (ignore-errors
(goto-char start)