From cfd7ee049a7c668bb2269029d159b34d2014ece6 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 11 Dec 2012 19:51:59 +0100 Subject: 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. --- src/window.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/window.cc') 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) -- cgit v1.2.3