summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-06-27 21:09:44 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-06-27 21:10:09 +0100
commit7aa78d726a54fa57a8dc5ed973ab0b30eeba6bf3 (patch)
treefa1e819c45bc452db76a67475ef3b937f1f8b70e /src
parenta8148d496fe8fceabf9c949bec66fa4e6381133a (diff)
fix potential infinite loop in show_matching highlighter
Diffstat (limited to 'src')
-rw-r--r--src/highlighters.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/highlighters.cc b/src/highlighters.cc
index 65b00e3e..51b8111f 100644
--- a/src/highlighters.cc
+++ b/src/highlighters.cc
@@ -543,7 +543,7 @@ void show_matching_char(const Context& context, HighlightFlags flags, DisplayBuf
apply_colors(colors));
break;
}
- else if (c == pair.second)
+ else if (c == pair.second and pos > range.first)
{
auto it = buffer.iterator_at(pos)-1;
auto end = buffer.iterator_at(range.first);