Fixed wrong showcmd in status bar.
authorDaniel Carl <danielcarl@gmx.de>
Wed, 3 Sep 2014 22:01:16 +0000 (00:01 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Wed, 3 Sep 2014 22:16:03 +0000 (00:16 +0200)
commite0d43522bd6a2ba9700c0ada11cef89dd865cc05
tree9d1fb73c08c968735466b6373397daf12ea6c7f8
parent9aa2bf417bf7809a2ee329a53f51abf129a1985a
Fixed wrong showcmd in status bar.

If there where mapping that start with keys that needs more keys and we wait
over the timeoutlen without typing further, the already typed keys where added
to the showcmd in status bar.

For example if ':nnoremap 1gt' is configured and '1' is typed, '1' is written
to showcmd. After timeoutlen '11' is written. If '1g' was typed, '1g1g' was
written after timeoutlen.

This patch adds a counter for keys shown in showcmd, so that we do not add
keys that are already present there.
src/ex.c
src/map.c
src/map.h
src/mode.c
src/normal.c