[meld] filediff: Clear highlighting tags in the callback to avoid flicker
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] filediff: Clear highlighting tags in the callback to avoid flicker
- Date: Sun, 21 Dec 2014 02:42:35 +0000 (UTC)
commit 2b82f59ae112f99f3f679934d63be20b3cbabba2
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Dec 21 11:59:30 2014 +1000
filediff: Clear highlighting tags in the callback to avoid flicker
meld/filediff.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 3db2e07..a73561b 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1363,6 +1363,10 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
if texts != (text1, textn):
return
+ if clear:
+ bufs[0].remove_tag(tags[0], starts[0], ends[0])
+ bufs[1].remove_tag(tags[1], starts[1], ends[1])
+
offsets = [ends[0].get_offset() - starts[0].get_offset(),
ends[1].get_offset() - starts[1].get_offset()]
@@ -1390,10 +1394,6 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
end.set_offset(offset + o[2 + 2 * i])
bufs[i].apply_tag(tags[i], start, end)
- if clear:
- bufs[0].remove_tag(tags[0], starts[0], ends[0])
- bufs[1].remove_tag(tags[1], starts[1], ends[1])
-
starts = [bufs[0].create_mark(None, starts[0], True),
bufs[1].create_mark(None, starts[1], True)]
ends = [bufs[0].create_mark(None, ends[0], True),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]