1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-15 01:11:09 +03:00

RangesHighlighter: a range that goes up to buffer end is not valid

This commit is contained in:
Maxime Coste 2018-03-16 23:25:37 +11:00
parent ebd47d538b
commit 0a2807e652

View File

@ -1469,7 +1469,7 @@ private:
try try
{ {
auto& r = std::get<0>(range); auto& r = std::get<0>(range);
if (buffer.is_valid(r.first) and buffer.is_valid(r.last)) if (buffer.is_valid(r.first) and (buffer.is_valid(r.last) and not buffer.is_end(r.last)))
highlight_range(display_buffer, r.first, buffer.char_next(r.last), false, highlight_range(display_buffer, r.first, buffer.char_next(r.last), false,
apply_face(get_face(std::get<1>(range)))); apply_face(get_face(std::get<1>(range))));
} }