[gedit] Do not trigger snippet by trigger with selection
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Do not trigger snippet by trigger with selection
- Date: Wed, 15 Aug 2012 07:13:57 +0000 (UTC)
commit 67b0f249fe186908425fa14cf6c5d6ac09e82f6a
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Wed Aug 15 09:13:41 2012 +0200
Do not trigger snippet by trigger with selection
plugins/snippets/snippets/document.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/snippets/snippets/document.py b/plugins/snippets/snippets/document.py
index 5dc482e..81e5030 100644
--- a/plugins/snippets/snippets/document.py
+++ b/plugins/snippets/snippets/document.py
@@ -819,7 +819,8 @@ class Document(GObject.Object, Gedit.ViewActivatable, Signals):
if not (state & Gdk.ModifierType.CONTROL_MASK) and \
not (state & Gdk.ModifierType.MOD1_MASK) and \
- event.keyval in self.TAB_KEY_VAL:
+ event.keyval in self.TAB_KEY_VAL and \
+ not view.get_buffer().get_has_selection():
if not state & Gdk.ModifierType.SHIFT_MASK:
return self.run_snippet()
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]