From b6f2b872b003639e3a596a2e4a1b817529ebd729 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 12 Oct 2014 18:58:10 +0100 Subject: [PATCH] Preserve selection orientation when replacing Fixes #31 --- src/selection.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/selection.cc b/src/selection.cc index b188a2fe..d5f72eb3 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -499,8 +499,8 @@ void SelectionList::insert(memoryview 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 {