Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Sun, 05 May 2019 17:14:58 UTC Commit: f460eb2bf989d176728ad3fb338f33d8d30216c9 https://github.com/geany/geany-plugins/commit/f460eb2bf989d176728ad3fb338f33...
Log Message: ----------- vimode: let ctrl-c leave the command mode
Modified Paths: -------------- vimode/src/excmd-prompt.c
Modified: vimode/src/excmd-prompt.c 14 lines changed, 12 insertions(+), 2 deletions(-) =================================================================== @@ -60,9 +60,10 @@ static void set_prompt_text(const gchar *val)
static gboolean on_prompt_key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer dummy) { - guint mask = GDK_MODIFIER_MASK & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK); + guint printable_mask = GDK_MODIFIER_MASK & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK); + guint modif_mask = GDK_MODIFIER_MASK & ~GDK_LOCK_MASK;
- if ((event->state & mask) == 0) + if ((event->state & printable_mask) == 0) { switch (event->keyval) { @@ -127,6 +128,15 @@ static gboolean on_prompt_key_press_event(GtkWidget *widget, GdkEventKey *event, } } } + else if ((event->state & modif_mask) == GDK_CONTROL_MASK) + { + switch (event->keyval) + { + case GDK_KEY_c: + close_prompt(); + return TRUE; + } + }
history_pos = -1;
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).