[gedit-code-assistance/wip/indent] Triggers might be inserted using shift, so just special case with enter
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-code-assistance/wip/indent] Triggers might be inserted using shift, so just special case with enter
- Date: Thu, 10 Apr 2014 15:21:30 +0000 (UTC)
commit 1371593cfe95acc59acc938cc14d08e307a77ec7
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Apr 10 17:21:07 2014 +0200
Triggers might be inserted using shift, so just special case with enter
src/gca-view.vala | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gca-view.vala b/src/gca-view.vala
index c57f370..58e8e15 100644
--- a/src/gca-view.vala
+++ b/src/gca-view.vala
@@ -312,8 +312,7 @@ class View : Object
{
if (d_document == null ||
d_indent_backend == null ||
- event.type != Gdk.EventType.KEY_PRESS ||
- (event.key.state & Gdk.ModifierType.SHIFT_MASK) != 0)
+ event.type != Gdk.EventType.KEY_PRESS)
{
return;
}
@@ -326,7 +325,8 @@ class View : Object
bool indent = false;
- if (event.key.keyval == Gdk.Key.Return || event.key.keyval == Gdk.Key.KP_Enter)
+ if ((event.key.keyval == Gdk.Key.Return || event.key.keyval == Gdk.Key.KP_Enter) &&
+ (event.key.state & Gdk.ModifierType.SHIFT_MASK) == 0)
{
indent = true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]