[geany/geany-plugins] 46102a: vimode: Only ignore key presses containing Alt

Jiří Techet git-noreply at xxxxx
Mon May 28 18:12:17 UTC 2018


Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Sat, 21 Apr 2018 21:06:00 UTC
Commit:      46102a8a674716aa4dbb6b324dd100a90dd32a2f
             https://github.com/geany/geany-plugins/commit/46102a8a674716aa4dbb6b324dd100a90dd32a2f

Log Message:
-----------
vimode: Only ignore key presses containing Alt

The previous mask was too restrictive and didn't contain GDK_MOD2_MASK
used for numlock. To avoid similar problems in the future, ignore only
Alt keypresses.


Modified Paths:
--------------
    vimode/src/keypress.c

Modified: vimode/src/keypress.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -23,10 +23,10 @@
 
 KeyPress *kp_from_event_key(GdkEventKey *ev)
 {
-	guint mask = GDK_MODIFIER_MASK & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK | GDK_CONTROL_MASK);
 	KeyPress *kp;
 
-	if (ev->state & mask)
+	/* ignore keypresses containing Alt - no Vim command uses it */
+	if (ev->state & GDK_MOD1_MASK)
 		return NULL;
 
 	switch (ev->keyval)



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list