[meld] ui.findbar: Use SearchContext's replace method
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] ui.findbar: Use SearchContext's replace method
- Date: Sat, 11 Oct 2014 21:28:51 +0000 (UTC)
commit 56316a22fe9f78e658b7bb97b3653bde8dbb0f00
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Oct 12 07:18:44 2014 +1000
ui.findbar: Use SearchContext's replace method
meld/ui/findbar.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/meld/ui/findbar.py b/meld/ui/findbar.py
index 7d17276..9ad72a6 100644
--- a/meld/ui/findbar.py
+++ b/meld/ui/findbar.py
@@ -107,11 +107,9 @@ class FindBar(gnomeglade.Component):
# Only replace if there is an already-selected match at the cursor
if (match and oldsel and oldsel[0].equal(newsel[0]) and
oldsel[1].equal(newsel[1])):
- buf.begin_user_action()
- buf.delete_selection(False, False)
- buf.insert_at_cursor(self.replace_entry.get_text())
+ self.search_context.replace(
+ newsel[0], newsel[1], self.replace_entry.get_text(), -1)
self._find_text(0)
- buf.end_user_action()
def on_replace_all_button_clicked(self, entry):
buf = self.textview.get_buffer()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]