summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-03-20 19:05:05 +0100
committerMaxime Coste <frrrwww@gmail.com>2013-03-20 19:11:58 +0100
commitd99fe87b43af1ecca7b61fbaba769aaed4475d03 (patch)
treec342c7639083e7f56f49face4ba9ea2b4ad40f6f /src
parent07a2c2944f10c77ef5c201803217718faea87df2 (diff)
Editor: fix select(Selection&, SelectMode::Replace)
Diffstat (limited to 'src')
-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);