diff options
| author | Stefan Monnier | 2009-09-09 14:47:54 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-09-09 14:47:54 +0000 |
| commit | cd8752523c8e4e2fe3655c2e81edd133fb8c1947 (patch) | |
| tree | 363e2aae383fd7425df8412b45f3a04c405f91e4 /lisp/diff-mode.el | |
| parent | 5cc79e5aff4952b45c8712232565f577ff550eba (diff) | |
| download | emacs-cd8752523c8e4e2fe3655c2e81edd133fb8c1947.tar.gz emacs-cd8752523c8e4e2fe3655c2e81edd133fb8c1947.zip | |
(diff-hunk-kill): Fix the search of the next hunk (bug#4368).
Diffstat (limited to 'lisp/diff-mode.el')
| -rw-r--r-- | lisp/diff-mode.el | 3 |
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." | |||
| 546 | (interactive) | 546 | (interactive) |
| 547 | (diff-beginning-of-hunk) | 547 | (diff-beginning-of-hunk) |
| 548 | (let* ((start (point)) | 548 | (let* ((start (point)) |
| 549 | (nexthunk (when (re-search-forward diff-hunk-header-re nil t) | 549 | ;; Search the second match, since we're looking at the first. |
| 550 | (nexthunk (when (re-search-forward diff-hunk-header-re nil t 2) | ||
| 550 | (match-beginning 0))) | 551 | (match-beginning 0))) |
| 551 | (firsthunk (ignore-errors | 552 | (firsthunk (ignore-errors |
| 552 | (goto-char start) | 553 | (goto-char start) |