Fix show_matching highlighter when opening char is the first buffer char

Fixes #119
This commit is contained in:
Maxime Coste 2014-05-13 19:45:32 +01:00
parent 6b42c48c3f
commit 016ede38d1

View File

@ -495,7 +495,7 @@ void show_matching_char(const Context& context, HighlightFlags flags, DisplayBuf
return false;
return true;
});
if (it != end)
if (it != end or (*end == pair.first and level == 1))
highlight_range(display_buffer, it.coord(), (it+1).coord(), false,
[&](DisplayAtom& atom) { atom.colors = colors; });
break;