From 3a1023ee5022071b46f659a82290bb0b3da42137 Mon Sep 17 00:00:00 2001 From: Georgi Kirilov Date: Tue, 2 Oct 2018 19:10:58 +0300 Subject: vis: don't search off screen when highlighting matches --- 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 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; -- cgit v1.2.3