fix potential infinite loop in show_matching highlighter

This commit is contained in:
Maxime Coste 2014-06-27 21:09:44 +01:00
parent a8148d496f
commit 7aa78d726a

View File

@ -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);