summaryrefslogtreecommitdiff
path: root/src/editor.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-02-28 18:51:58 +0100
committerMaxime Coste <frrrwww@gmail.com>2013-02-28 18:51:58 +0100
commit298926a16e4b0e26098ae23b00a73b768b200273 (patch)
treeea4ef06c65a2d3fa9402c453ac2f3b351352e828 /src/editor.cc
parent161e32e13794914c9fb324aa384b26dff3aaf9e3 (diff)
Editor::multi_select: reserve some vector space in advance
Diffstat (limited to 'src/editor.cc')
-rw-r--r--src/editor.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/editor.cc b/src/editor.cc
index 9c553dec..476e5244 100644
--- a/src/editor.cc
+++ b/src/editor.cc
@@ -301,6 +301,7 @@ void Editor::multi_select(const MultiSelector& selector)
for (auto& sel : m_selections)
{
SelectionList res = selector(sel);
+ new_selections.reserve(new_selections.size() + res.size());
for (auto& new_sel : res)
{
// preserve captures when selectors captures nothing.