summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/gedit-plugins/files/gedit-plugins-2.32.0-replace-all.patch')
-rw-r--r--app-editors/gedit-plugins/files/gedit-plugins-2.32.0-replace-all.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/app-editors/gedit-plugins/files/gedit-plugins-2.32.0-replace-all.patch b/app-editors/gedit-plugins/files/gedit-plugins-2.32.0-replace-all.patch
new file mode 100644
index 0000000..03510af
--- /dev/null
+++ b/app-editors/gedit-plugins/files/gedit-plugins-2.32.0-replace-all.patch
@@ -0,0 +1,53 @@
+From facc66d97ee959309ce7900553cc1f7a6517c394 Mon Sep 17 00:00:00 2001
+From: Jesse van den Kieboom <jesse@icecrew.nl>
+Date: Thu, 29 Apr 2010 17:15:09 +0000
+Subject: Improved handling of scrolling for replace-all command
+
+---
+diff --git a/plugins/commander/modules/find/finder.py b/plugins/commander/modules/find/finder.py
+index 3abc16b..bc453f1 100644
+--- a/plugins/commander/modules/find/finder.py
++++ b/plugins/commander/modules/find/finder.py
+@@ -195,7 +195,7 @@ class Finder:
+
+ self.cancel()
+ yield commands.result.DONE
+-
++
+ def _restore_cursor(self, mark):
+ buf = mark.get_buffer()
+
+@@ -221,10 +221,16 @@ class Finder:
+
+ if not ret:
+ yield commands.result.DONE
+-
++
++ self.scroll_back = False
++
+ # Then ask for the replacement string
+ if not self.replacestr:
+ try:
++ if replaceall:
++ self.scroll_back = True
++ self.select_last_result()
++
+ replacestr, words, modifier = (yield commands.result.Prompt('Replace with:'))
+ self.set_replace(replacestr)
+ except GeneratorExit, e:
+@@ -272,10 +278,11 @@ class Finder:
+ buf.end_user_action()
+
+ self.cancel()
+- raise e
++ raise e
+
+ if replaceall:
+- self._restore_cursor(startmark)
++ if self.scroll_back:
++ self._restore_cursor(startmark)
+
+ buf.end_user_action()
+
+--
+cgit v0.8.3.1