From d97c8cc3cf9b64c680f4ae933354adc19e50dde2 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 6 Feb 2017 09:58:42 -0800 Subject: Disable keymap for movement_key character The character following a movement_key command should not be subject to keymap translation since it is used to find characters in the document. --- main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 40cb9c5..4c6b1cf 100644 --- a/main.c +++ b/main.c @@ -1716,9 +1716,14 @@ static const char *operator_filter(Vis *vis, const char *keys, const Arg *arg) { } static const char *movement_key(Vis *vis, const char *keys, const Arg *arg) { + if (!keys[0]) { + vis_keymap_disable(vis); + return NULL; + } + char key[32]; const char *next; - if (!keys[0] || !(next = vis_keys_next(vis, keys))) + if (!(next = vis_keys_next(vis, keys))) return NULL; size_t len = next - keys; if (len < sizeof key) { -- cgit v1.2.3