Fix Selection::insert when replacing with empty string at the end of the buffer
This commit is contained in:
parent
731277a425
commit
6813440212
|
@ -487,7 +487,7 @@ void SelectionList::insert(memoryview<String> strings, InsertMode mode,
|
||||||
if (str.empty())
|
if (str.empty())
|
||||||
{
|
{
|
||||||
if (mode == InsertMode::Replace)
|
if (mode == InsertMode::Replace)
|
||||||
sel.anchor() = sel.cursor() = pos.coord();
|
sel.anchor() = sel.cursor() = m_buffer->clamp(pos.coord());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user