[gnome-builder] python: do nothing on shift<enter>
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] python: do nothing on shift<enter>
- Date: Sat, 3 Oct 2015 22:29:20 +0000 (UTC)
commit 6023db0723f0f8cb6509cf31b147918d57d0dbe7
Author: Christian Hergert <christian hergert me>
Date: Sat Oct 3 15:18:11 2015 -0700
python: do nothing on shift<enter>
plugins/python-pack/python_indenter.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/python-pack/python_indenter.py b/plugins/python-pack/python_indenter.py
index 3554238..e736b8e 100644
--- a/plugins/python-pack/python_indenter.py
+++ b/plugins/python-pack/python_indenter.py
@@ -462,6 +462,10 @@ class PythonIndenter(GObject.Object): #, Ide.Indenter):
return (' ' * column), 0
def format_enter(self, view, begin, end, event):
+ # Do nothing if they held shift while pressing enter
+ if event.state & Gdk.ModifierType.SHIFT_MASK != 0:
+ return '\n', 0
+
iter = begin.copy()
# Discover our various rankings
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]