[gedit-plugins] Implement skip replace using Ctrl+Enter in commander find
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins] Implement skip replace using Ctrl+Enter in commander find
- Date: Sun, 9 May 2010 15:08:06 +0000 (UTC)
commit 61230c3a1251d4d07eea344f43c91856efa51e22
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]