mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-23 23:34:12 +03:00
Avoid buffer end in compute_modified_ranges
This commit is contained in:
parent
7cddaacc5d
commit
87fcfda508
@ -321,6 +321,11 @@ Vector<Selection> compute_modified_ranges(Buffer& buffer, size_t timestamp)
|
||||
|
||||
for (auto& sel : ranges)
|
||||
{
|
||||
if (buffer.is_end(sel.anchor()))
|
||||
sel.anchor() = buffer.back_coord();
|
||||
if (buffer.is_end(sel.cursor()))
|
||||
sel.cursor() = buffer.back_coord();
|
||||
|
||||
if (sel.anchor() != sel.cursor())
|
||||
sel.cursor() = buffer.char_prev(sel.cursor());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user