vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 6fcda63079afffb53f410610003892e8ae550725 parent 78bb0c093d4e4501ec2db861bf0d305443b283ca Author: Marc André Tanner <mat@brain-dump.org> Date: Tue, 8 Nov 2016 22:30:39 +0100 vis: fix key parsing/skipping logic We should only attempt to parse special keys if they are delimited by angle brackets i.e. <Key> but not Key. Previously we would wrongly skip over the latter. Diffstat:
| M | vis.c | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/vis.c b/vis.c @@ -769,9 +769,11 @@ const char *vis_keys_next(Vis *vis, const char *keys) { return end + 1; } } + if (ISUTF8(*keys)) + keys++; while (!ISUTF8(*keys)) keys++; - return termkey_strpkey(termkey, keys, &key, TERMKEY_FORMAT_VIM); + return keys; } static void vis_keys_process(Vis *vis, size_t pos) {