From 298926a16e4b0e26098ae23b00a73b768b200273 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 28 Feb 2013 18:51:58 +0100 Subject: [PATCH] Editor::multi_select: reserve some vector space in advance --- src/editor.cc | 1 + 1 file changed, 1 insertion(+) 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.