Fix Selection::insert when replacing with empty string at the end of the buffer

This commit is contained in:
Maxime Coste 2014-07-25 23:47:11 +01:00
parent 731277a425
commit 6813440212

View File

@ -487,7 +487,7 @@ void SelectionList::insert(memoryview<String> strings, InsertMode mode,
if (str.empty())
{
if (mode == InsertMode::Replace)
sel.anchor() = sel.cursor() = pos.coord();
sel.anchor() = sel.cursor() = m_buffer->clamp(pos.coord());
continue;
}