[meld] filediff: Actually clean up our temporary buffer markers
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] filediff: Actually clean up our temporary buffer markers
- Date: Fri, 28 Mar 2014 23:39:17 +0000 (UTC)
commit e347cef2e72f3b7f956e97770cf8ddbc85d9bc98
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Mar 8 09:35:19 2014 +1000
filediff: Actually clean up our temporary buffer markers
meld/filediff.py | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 8a859f6..9bbbe17 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1332,16 +1332,21 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
self._prompt_long_highlighting()
continue
- def apply_highlight(bufs, tags, starts, ends, texts, matches):
- starts = [bufs[0].get_iter_at_mark(starts[0]),
- bufs[1].get_iter_at_mark(starts[1])]
- ends = [bufs[0].get_iter_at_mark(ends[0]),
- bufs[1].get_iter_at_mark(ends[1])]
+ def apply_highlight(bufs, tags, start_marks, end_marks, texts, matches):
+ starts = [bufs[0].get_iter_at_mark(start_marks[0]),
+ bufs[1].get_iter_at_mark(start_marks[1])]
+ ends = [bufs[0].get_iter_at_mark(end_marks[0]),
+ bufs[1].get_iter_at_mark(end_marks[1])]
text1 = bufs[0].get_text(starts[0], ends[0], False)
text1 = text_type(text1, 'utf8')
textn = bufs[1].get_text(starts[1], ends[1], False)
textn = text_type(textn, 'utf8')
+ bufs[0].delete_mark(start_marks[0])
+ bufs[0].delete_mark(end_marks[0])
+ bufs[1].delete_mark(start_marks[1])
+ bufs[1].delete_mark(end_marks[1])
+
if texts != (text1, textn):
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]