Fixed none working keybindings with <ctrl-x> whene x is a modkey.
authorDaniel Carl <danielcarl@gmx.de>
Mon, 5 Aug 2013 19:42:26 +0000 (21:42 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Mon, 5 Aug 2013 19:44:15 +0000 (21:44 +0200)
If a keybinding exists with a modekey 'x' no keybinding with 'x' and
additional modifiers worked.

src/keybind.c

index 096c3e5..00c7879 100644 (file)
@@ -254,6 +254,7 @@ static gboolean keypress_cb(WebKitWebView *webview, GdkEventKey *event)
 
         return true;
     }
+
     /* allow mode keys and counts only in normal mode and search mode */
     if (vb.state.mode & (VB_MODE_NORMAL|VB_MODE_SEARCH)) {
         if (vb.state.modkey == 0 && ((keyval >= GDK_1 && keyval <= GDK_9)
@@ -264,7 +265,10 @@ static gboolean keypress_cb(WebKitWebView *webview, GdkEventKey *event)
 
             return true;
         }
-        if (strchr(modkeys->str, keyval) && vb.state.modkey != keyval) {
+        /* modekeys don't have ctrl or mod modiefiers set */
+        if (!CLEAN_STATE(event)
+            && strchr(modkeys->str, keyval) && vb.state.modkey != keyval
+        ) {
             vb.state.modkey = (char)keyval;
             vb_update_statusbar();