summaryrefslogtreecommitdiff
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2008-02-29 02:40:10 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2008-02-29 02:40:10 +0000
commit79fd61680608307ec1be4c53705b542d8d383778 (patch)
treeb5578034c0765eeed58d2c90f8a17d676915cf85 /lisp/diff-mode.el
parentfbd882eda03b9f6dc4efb84a6a527cd1062ed6ee (diff)
downloademacs-79fd61680608307ec1be4c53705b542d8d383778.tar.gz
(diff-sanity-check-hunk): Only accept an empty line if
we still expect more lines.
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 5a01793d06e..c57613dff51 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -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))