[meld] ui.findbar: Migrate to updated search context API
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] ui.findbar: Migrate to updated search context API
- Date: Wed, 14 Aug 2019 20:54:42 +0000 (UTC)
commit 99b10de4f247c667daccbb8b89b44369795b83f3
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Jul 14 07:41:48 2019 +1000
ui.findbar: Migrate to updated search context API
meld/ui/findbar.py | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/meld/ui/findbar.py b/meld/ui/findbar.py
index 0432a439..63593632 100644
--- a/meld/ui/findbar.py
+++ b/meld/ui/findbar.py
@@ -186,16 +186,14 @@ class FindBar(Gtk.Grid):
self.wrap_box.set_visible(False)
if not backwards:
insert.forward_chars(start_offset)
- match, start_iter, end_iter = self.search_context.forward(insert)
- if match and (start_iter.get_offset() < insert.get_offset()):
- self.wrap_box.set_visible(True)
+ match, start, end, wrapped = self.search_context.forward(insert)
else:
- match, start_iter, end_iter = self.search_context.backward(insert)
- if match and (start_iter.get_offset() > insert.get_offset()):
- self.wrap_box.set_visible(True)
+ match, start, end, wrapped = self.search_context.backward(insert)
+
if match:
- buf.place_cursor(start_iter)
- buf.move_mark(buf.get_selection_bound(), end_iter)
+ self.wrap_box.set_visible(wrapped)
+ buf.place_cursor(start)
+ buf.move_mark(buf.get_selection_bound(), end)
self.textview.scroll_to_mark(
buf.get_insert(), 0.25, True, 0.5, 0.5)
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]