[gedit-plugins/gnome-2-32] Implement skip replace using Ctrl+Enter in commander find



commit df73f774a5bde566eba4679f8dca5a616e01123c
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date:   Sun May 9 17:07:51 2010 +0200

    Implement skip replace using Ctrl+Enter in commander find

 plugins/commander/modules/find/finder.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/commander/modules/find/finder.py b/plugins/commander/modules/find/finder.py
index 6e10941..2271e75 100644
--- a/plugins/commander/modules/find/finder.py
+++ b/plugins/commander/modules/find/finder.py
@@ -1,6 +1,7 @@
 from xml.sax import saxutils
 import commander.commands as commands
 import commander.utils as utils
+import gtk
 
 class Finder:
 	FIND_STARTMARK = 'gedit-commander-find-startmark'
@@ -270,7 +271,7 @@ class Finder:
 				                       'end': buf.get_iter_at_mark(self.find_result.end)})
 
 				# If there is a selection, replace it with the replacement string
-				if not bounds.start.equal(bounds.end):
+				if not bounds.start.equal(bounds.end) and not (modifier & gtk.gdk.CONTROL_MASK):
 					text = bounds.start.get_text(bounds.end)
 					repl = self.get_replace(text)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]