mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-28 09:07:19 +03:00
Clamp modified coord in Selection as it could be buffer end
This commit is contained in:
parent
695c85f451
commit
eba98ecad4
@ -143,11 +143,11 @@ void SelectionList::update()
|
||||
{
|
||||
auto anchor = update_pos(modifs, sel.anchor());
|
||||
kak_assert(m_buffer->is_valid(anchor));
|
||||
sel.anchor() = anchor;
|
||||
sel.anchor() = m_buffer->clamp(anchor);
|
||||
|
||||
auto cursor = update_pos(modifs, sel.cursor());
|
||||
kak_assert(m_buffer->is_valid(cursor));
|
||||
sel.cursor() = cursor;
|
||||
sel.cursor() = m_buffer->clamp(cursor);
|
||||
}
|
||||
|
||||
merge_overlapping(overlaps);
|
||||
|
Loading…
Reference in New Issue
Block a user