summaryrefslogtreecommitdiff
path: root/src/editor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor.cc')
-rw-r--r--src/editor.cc3
1 files changed, 3 insertions, 0 deletions
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);