vis

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

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

commit 8789c2742ec6c1127f02b08ab7e6df1324f3e19a
parent ab97dcef7ba6f0e0aceb783e4b5fcb0338de610e
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu, 19 Nov 2015 23:25:27 +0100

vis: fix <C-n> in visual mode for partial matches

We need to properly skip partial matches (i.e. not whole words).

Closes #118

Diffstat:
Mtext-objects.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/text-objects.c b/text-objects.c @@ -192,7 +192,7 @@ Filerange text_object_word_find_next(Text *txt, size_t pos, const char *word) { Filerange match_word = text_object_word(txt, match_pos); if (text_range_size(&match_word) == len) return match_word; - pos = match_pos; + pos = match_word.end; } else { return text_range_empty(); }