summaryrefslogtreecommitdiff
path: root/src/editor.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-05-14 13:58:41 +0200
committerMaxime Coste <frrrwww@gmail.com>2013-05-14 13:58:41 +0200
commit1fb971e3896df956e9fab1a680e96edde8d067c1 (patch)
treee0c5b68c9221b67b64ab46f40c7439d0ea3a82dc /src/editor.cc
parent9cbf790d1320435f1c842d237cc65d5b87b61aa0 (diff)
Editor::select(Selection, SelectMode::Extend) now only keeps the extended main selection
Diffstat (limited to 'src/editor.cc')
-rw-r--r--src/editor.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/editor.cc b/src/editor.cc
index ac7f4ec8..324ee92c 100644
--- a/src/editor.cc
+++ b/src/editor.cc
@@ -255,7 +255,8 @@ void Editor::select(const Selection& selection, SelectMode mode)
else if (mode == SelectMode::Extend)
{
m_selections[m_main_sel].merge_with(selection);
- sort_and_merge_overlapping(m_selections, m_main_sel);
+ m_selections = SelectionList{ std::move(m_selections[m_main_sel]) };
+ m_main_sel = 0;
}
else if (mode == SelectMode::Append)
{