From 67c08e598b1415753cf6fa366c23536200308e3c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 21 Dec 2011 19:06:51 +0000 Subject: [PATCH] IncrementalInserter: preserve selection through hook call --- src/window.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/window.cc b/src/window.cc index 952bc558..fb294dd7 100644 --- a/src/window.cc +++ b/src/window.cc @@ -471,11 +471,13 @@ IncrementalInserter::~IncrementalInserter() { move_cursor(DisplayCoord(0, -1)); + m_window.push_selections(); try { HooksManager::instance().run_hook("WinInsertEnd", "", Context(m_window)); } catch (runtime_error& e) {} + m_window.pop_selections(); assert(m_window.m_current_inserter == this); m_window.m_current_inserter = nullptr;