From 45fb865e1bee5e33e3f87ca8f6c6f5c9c04b2fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Stadler?= Date: Fri, 9 Jan 2009 23:02:27 +0200 Subject: [PATCH] Fix incorrect diff hightlighting of lines beginning with "+" or "-". --- magit.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magit.el b/magit.el index dac2eeb2..4d77990e 100644 --- a/magit.el +++ b/magit.el @@ -1216,7 +1216,7 @@ Please see the manual for a complete description of Magit. (defun magit-wash-hunk () (cond ((looking-at "\\(^@+\\)[^@]*@+") - (let ((n-files (length (match-string 1))) + (let ((n-columns (1- (length (match-string 1)))) (head (match-string 0))) (magit-with-section head 'hunk (magit-put-line-property 'face 'magit-diff-hunk-header) @@ -1224,7 +1224,7 @@ Please see the manual for a complete description of Magit. (while (not (or (eobp) (looking-at "^diff\\|^@@"))) (let ((prefix (buffer-substring-no-properties - (point) (min (+ (point) n-files) (point-max))))) + (point) (min (+ (point) n-columns) (point-max))))) (cond ((string-match "\\+" prefix) (magit-put-line-property 'face 'magit-diff-add)) ((string-match "-" prefix)