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());
|
auto anchor = update_pos(modifs, sel.anchor());
|
||||||
kak_assert(m_buffer->is_valid(anchor));
|
kak_assert(m_buffer->is_valid(anchor));
|
||||||
sel.anchor() = anchor;
|
sel.anchor() = m_buffer->clamp(anchor);
|
||||||
|
|
||||||
auto cursor = update_pos(modifs, sel.cursor());
|
auto cursor = update_pos(modifs, sel.cursor());
|
||||||
kak_assert(m_buffer->is_valid(cursor));
|
kak_assert(m_buffer->is_valid(cursor));
|
||||||
sel.cursor() = cursor;
|
sel.cursor() = m_buffer->clamp(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
merge_overlapping(overlaps);
|
merge_overlapping(overlaps);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user