From: Daniel Carl Date: Mon, 30 Sep 2013 20:05:01 +0000 (+0200) Subject: Fixed non shown keys if keystroke where not ambiguous. X-Git-Url: https://git.owens.tech/assets/static/git.owens.tech/assets/static/git.owens.tech/git?a=commitdiff_plain;h=2553a421011324e8f1456989c7228752ca714bc8;p=vimb.git Fixed non shown keys if keystroke where not ambiguous. 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. --- diff --git a/src/map.c b/src/map.c index 7f87b7b..a7784bd 100644 --- 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); } } }