summaryrefslogtreecommitdiff
path: root/src/window.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-12-11 19:51:59 +0100
committerMaxime Coste <frrrwww@gmail.com>2012-12-13 18:50:27 +0100
commitcfd7ee049a7c668bb2269029d159b34d2014ece6 (patch)
treedc8d3eef1af8318acde758de012db858d4c36e30 /src/window.cc
parente36bc74f431e2f98f049724536da86af9051811d (diff)
move selection updating code out of selection, to DynamicSelectionList
this avoids a lot of unnecessary (add|remove)_change_listener as creating temporary Selections do not call that anymore. Use can choose between a SelectionList which or a DynamicSelectionList depending on wethear the buffer will be modified or not during the selections lifetime.
Diffstat (limited to 'src/window.cc')
-rw-r--r--src/window.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/window.cc b/src/window.cc
index 821045cd..ff8a06ca 100644
--- a/src/window.cc
+++ b/src/window.cc
@@ -175,9 +175,9 @@ String Window::status_line() const
void Window::on_incremental_insertion_end()
{
- SelectionList backup(selections());
+ DynamicSelectionList backup(buffer(), selections());
hooks().run_hook("InsertEnd", "", Context(*this));
- select(backup);
+ select((SelectionList)backup);
}
void Window::on_option_changed(const String& name, const Option& option)