aboutsummaryrefslogtreecommitdiff
path: root/text-objects.c
diff options
context:
space:
mode:
authorGeorgi Kirilov <in.the@repo>2018-10-02 19:10:58 +0300
committerMarc André Tanner <mat@brain-dump.org>2020-01-26 16:28:36 +0100
commit3a1023ee5022071b46f659a82290bb0b3da42137 (patch)
tree307ae035f4c1e4e12008e8bed8bd456601f82106 /text-objects.c
parentb7013fa7e549162af478d58ffc1f5ed369f58408 (diff)
downloadvis-3a1023ee5022071b46f659a82290bb0b3da42137.tar.gz
vis-3a1023ee5022071b46f659a82290bb0b3da42137.tar.xz
vis: don't search off screen when highlighting matches
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 b39d13c..f4fcb4a 100644
--- a/text-objects.c
+++ b/text-objects.c
@@ -230,7 +230,7 @@ static Filerange text_object_bracket(Text *txt, size_t pos, char type) {
Iterator it = text_iterator_get(txt, pos);
if (open == close && text_iterator_byte_get(&it, &c) && (c == '"' || c == '`' || c == '\'')) {
- size_t match = text_bracket_match(txt, pos);
+ size_t match = text_bracket_match(txt, pos, NULL);
r.start = MIN(pos, match) + 1;
r.end = MAX(pos, match);
return r;