Skip to content

Commit

Permalink
Disable keymap for movement_key character
Browse files Browse the repository at this point in the history
The character following a movement_key command should not be subject to
keymap translation since it is used to find characters in the document.
  • Loading branch information
michaelforney committed Feb 6, 2017
1 parent 2464589 commit d97c8cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d97c8cc

Please sign in to comment.