vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 9d6dcff54a34343e9cc625dc516cf4ba389e4f90
parent 7cd9fef16e3d4ec26cba5e3952aca95d0084d159
Author: Michael Forney <mforney@mforney.org>
Date:   Mon,  6 Feb 2017 09:58:42 -0800

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:
Mmain.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 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) {