Fixed non shown keys if keystroke where not ambiguous.
authorDaniel Carl <danielcarl@gmx.de>
Mon, 30 Sep 2013 20:05:01 +0000 (22:05 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Mon, 30 Sep 2013 20:05:01 +0000 (22:05 +0200)
If a keybinding was used, that contained of multiple keys, but had no prefix
in common with another keybinding, the typed keys where not shown to the user.

src/map.c

index 7f87b7b..a7784bd 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -237,6 +237,9 @@ MapState map_handle_keys(const char *keys, int keylen)
 
                 /* find ambiguous matches */
                 if (!timeout && m->inlen > map.qlen && !strncmp(m->in, map.queue, map.qlen)) {
+                    if (ambiguous == 0) {
+                        showcmd(map.queue, map.qlen);
+                    }
                     ambiguous++;
                 }
                 /* complete match or better/longer match than previous found */
@@ -246,7 +249,6 @@ MapState map_handle_keys(const char *keys, int keylen)
                 ) {
                     /* backup this found possible match */
                     match = m;
-                    showcmd(map.queue, map.qlen);
                 }
             }
         }