1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(diff-sanity-check-hunk): Only accept an empty line if

we still expect more lines.
This commit is contained in:
Stefan Monnier 2008-02-29 02:40:10 +00:00
parent fbd882eda0
commit 79fd616806
2 changed files with 7 additions and 1 deletions

View 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'.

View 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))