Preserve selection orientation when replacing

Fixes #31
This commit is contained in:
Maxime Coste 2014-10-12 18:58:10 +01:00
parent 7a2afbcf48
commit b6f2b872b0

View File

@ -499,8 +499,8 @@ void SelectionList::insert(memoryview<String> strings, InsertMode mode,
if (select_inserted or mode == InsertMode::Replace)
{
sel.anchor() = change.begin;
sel.cursor() = m_buffer->char_prev(change.end);
sel.min() = change.begin;
sel.max() = m_buffer->char_prev(change.end);
}
else
{