[gnome-builder] source-view: handle shift-tab same as GDK_KEY_ISO_Left_Tab
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] source-view: handle shift-tab same as GDK_KEY_ISO_Left_Tab
- Date: Fri, 11 Nov 2016 03:17:23 +0000 (UTC)
commit 9eba53125b65a1ce085b69b35ff8c17d4e6c9f3d
Author: Christian Hergert <chergert redhat com>
Date: Wed Nov 9 20:00:35 2016 -0800
source-view: handle shift-tab same as GDK_KEY_ISO_Left_Tab
libide/sourceview/ide-source-view.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/libide/sourceview/ide-source-view.c b/libide/sourceview/ide-source-view.c
index 6649b6f..2724b80 100644
--- a/libide/sourceview/ide-source-view.c
+++ b/libide/sourceview/ide-source-view.c
@@ -2371,13 +2371,16 @@ ide_source_view_key_press_event (GtkWidget *widget,
case GDK_KEY_KP_Tab:
case GDK_KEY_Tab:
- ide_source_view_block_handlers (self);
- if (!ide_source_snippet_move_next (snippet))
- ide_source_view_pop_snippet (self);
- ide_source_view_scroll_to_insert (self);
- ide_source_view_unblock_handlers (self);
- return TRUE;
-
+ if ((event->state & GDK_SHIFT_MASK) == 0)
+ {
+ ide_source_view_block_handlers (self);
+ if (!ide_source_snippet_move_next (snippet))
+ ide_source_view_pop_snippet (self);
+ ide_source_view_scroll_to_insert (self);
+ ide_source_view_unblock_handlers (self);
+ return TRUE;
+ }
+ /* Fallthrough */
case GDK_KEY_ISO_Left_Tab:
ide_source_view_block_handlers (self);
ide_source_snippet_move_previous (snippet);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]