From d99fe87b43af1ecca7b61fbaba769aaed4475d03 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 20 Mar 2013 19:05:05 +0100 Subject: [PATCH] Editor: fix select(Selection&, SelectMode::Replace) --- src/editor.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/editor.cc b/src/editor.cc index a3d012b6..2c32949e 100644 --- a/src/editor.cc +++ b/src/editor.cc @@ -241,7 +241,10 @@ void Editor::remove_selection(int index) void Editor::select(const Selection& selection, SelectMode mode) { if (mode == SelectMode::Replace) + { m_selections = SelectionList{ selection }; + m_main_sel = 0; + } else if (mode == SelectMode::Extend) { m_selections[m_main_sel].merge_with(selection);