summaryrefslogtreecommitdiff
path: root/src/context.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-06-01 16:01:38 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-06-01 16:01:38 +0100
commita5e028e1b16f1fc802b8dcee26791e8c64ac2aea (patch)
tree67b80331ee83632b7724114a8b112f4ac561bc5e /src/context.cc
parent1b30c0f4fbc9bad48d0689fd748206ce7072b38d (diff)
Add Context::set_selections(std::vector<Selection>)
This methods avoids updating the context selection needlessly as they are going to get replaced anyway.
Diffstat (limited to 'src/context.cc')
-rw-r--r--src/context.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/context.cc b/src/context.cc
index e909f1f5..21704168 100644
--- a/src/context.cc
+++ b/src/context.cc
@@ -202,6 +202,11 @@ std::vector<String> Context::selections_content() const
return contents;
}
+void Context::set_selections(std::vector<Selection> sels)
+{
+ *m_selections = std::move(sels);
+}
+
void Context::begin_edition()
{
if (m_edition_level >= 0)