From 7165cbcb182515e26b6d1b7beef46ce5abde04aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 19 Nov 2015 23:25:27 +0100 Subject: vis: fix in visual mode for partial matches We need to properly skip partial matches (i.e. not whole words). Closes #118 --- text-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'text-objects.c') diff --git a/text-objects.c b/text-objects.c index a4a0db7..d786a2d 100644 --- 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(); } -- cgit v1.2.3