]> git.eshelyaron.com Git - emacs.git/commitdiff
(diff-sanity-check-hunk): Only accept an empty line if
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 29 Feb 2008 02:40:10 +0000 (02:40 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 29 Feb 2008 02:40:10 +0000 (02:40 +0000)
we still expect more lines.

lisp/ChangeLog
lisp/diff-mode.el

index 499f2fd82b3d12e6afaa2f7ec14f349f3d0bbc7e..438e2b5f52a50b04fc8035e346b46b7294b5e726 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * diff-mode.el (diff-sanity-check-hunk): Only accept an empty line if
+       we still expect more lines.
+
 2008-02-28  Juri Linkov  <juri@jurta.org>
 
        * startup.el (normal-splash-screen): Add argument `concise'.
index 5a01793d06e7a02fb4aebf8940f2c665dea08247..c57613dff518b29097d2d475e80789e62b52fb0f 100644 (file)
@@ -1251,7 +1251,8 @@ Only works for unified diffs."
                    (cond
                     ((and diff-valid-unified-empty-line
                           ;; Not just (eolp) so we don't infloop at eob.
-                          (eq (char-after) ?\n))
+                          (eq (char-after) ?\n)
+                          (> before 0) (> after 0))
                      (decf before) (decf after) t)
                     ((and (zerop before) (zerop after)) nil)
                     ((or (< before 0) (< after 0))