(diff-end-of-hunk): Don't match empty lines in unified format.
This commit is contained in:
parent
d1050c6987
commit
1c6aa2f55f
1 changed files with 5 additions and 1 deletions
|
@ -391,9 +391,13 @@ when editing big diffs)."
|
|||
;; Especially important for unified (because headers are ambiguous).
|
||||
(setq style (cdr (assq (char-after) '((?@ . unified) (?* . context))))))
|
||||
(goto-char (match-end 0)))
|
||||
;; Some versions of diff replace all-blank context lines in unified
|
||||
;; format with empty lines. The use of \n below avoids matching such
|
||||
;; lines as headers.
|
||||
;; http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01990.html
|
||||
(let ((end (and (re-search-forward (case style
|
||||
;; A `unified' header is ambiguous.
|
||||
(unified (concat "^[^-+# \\]\\|"
|
||||
(unified (concat "^[^-+# \\\n]\\|"
|
||||
diff-file-header-re))
|
||||
(context "^[^-+#! \\]")
|
||||
(normal "^[^<>#\\]")
|
||||
|
|
Loading…
Add table
Reference in a new issue