aboutsummaryrefslogtreecommitdiff
path: root/text-objects.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-11-19 23:25:27 +0100
committerMarc André Tanner <mat@brain-dump.org>2015-11-19 23:32:12 +0100
commit7165cbcb182515e26b6d1b7beef46ce5abde04aa (patch)
tree1233bde725ee193ec435bde1ac7589ae72f15ad3 /text-objects.c
parenta62859dd9ba460f946c37ed1bcf971f0167a3852 (diff)
downloadvis-7165cbcb182515e26b6d1b7beef46ce5abde04aa.tar.gz
vis-7165cbcb182515e26b6d1b7beef46ce5abde04aa.tar.xz
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 (limited to 'text-objects.c')
-rw-r--r--text-objects.c2
1 files changed, 1 insertions, 1 deletions
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();
}