aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-02-06 09:58:42 -0800
committerMichael Forney <mforney@mforney.org>2017-02-06 10:09:42 -0800
commitd97c8cc3cf9b64c680f4ae933354adc19e50dde2 (patch)
tree1d2a42d8fef275f3885827d32ebb686c373210f2 /main.c
parent2464589156b1c75a883b6320328c3479a95dc6ae (diff)
downloadvis-d97c8cc3cf9b64c680f4ae933354adc19e50dde2.tar.gz
vis-d97c8cc3cf9b64c680f4ae933354adc19e50dde2.tar.xz
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.
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 6 insertions, 1 deletions
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) {