From 7a3e2bdf2c6ae3bfe68fa9543515aba0242b0a52 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Wed, 6 Aug 2008 15:51:09 +0300 Subject: [PATCH] Correctly reset state when starting a new hunk. --- magit.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/magit.el b/magit.el index 89ebb9e2..b50450e3 100644 --- a/magit.el +++ b/magit.el @@ -208,7 +208,7 @@ (when head-beg (put-text-property head-beg head-end 'magit-info (list 'diff - head-beg (point)))))) + head-beg (point)))))) (defun magit-wash-diff-propertize-hunk (head-beg head-end hunk-beg) (when hunk-beg @@ -228,8 +228,10 @@ (point) (+ (point) n-files)))) (cond ((looking-at "^diff") (magit-wash-diff-propertize-diff head-beg head-end) + (magit-wash-diff-propertize-hunk head-beg head-end hunk-beg) (setq head-beg (point)) - (setq head-end nil)) + (setq head-end nil) + (setq hunk-beg nil)) ((looking-at "^@+") (setq n-files (- (length (match-string 0)) 1)) (if (null head-end)