[meld] Fix classification of deleted hunks in middle-pane
- From: Kai Willadsen <kaiw src gnome org>
- To: svn-commits-list gnome org
- Subject: [meld] Fix classification of deleted hunks in middle-pane
- Date: Tue, 7 Jul 2009 07:19:19 +0000 (UTC)
commit bf9f5aa3efa5b3e45d03bf1e7faf8e610c494822
Author: Piotr Piastucki <the_leech users berlios de>
Date: Mon Jul 6 18:06:06 2009 +0200
Fix classification of deleted hunks in middle-pane
In situations where a middle-pane hunk does not exist in either left or
right panes, the hunk was being classified as a modified hunk. This commit
fixes this problem so that these hunks are now classified as inserted.
diffutil.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/diffutil.py b/diffutil.py
index 907ba7f..c78b07f 100644
--- a/diffutil.py
+++ b/diffutil.py
@@ -221,7 +221,9 @@ class Differ(object):
else:
l0, h0, l1, h1, l2, h2 = self._merge_blocks(using)
if h0-l0 == h2-l2 and texts[0][l0:h0] == texts[2][l2:h2]:
- if l1 != h1:
+ if l1 != h1 and l0 == h0:
+ tag = "delete"
+ elif l1 != h1:
tag = "replace"
else:
tag = "insert"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]