diff --git a/src/hooks_manager.cc b/src/hooks_manager.cc index 0a9ef1ce..239e429d 100644 --- a/src/hooks_manager.cc +++ b/src/hooks_manager.cc @@ -17,7 +17,13 @@ void HooksManager::run_hook(const std::string& hook_name, return; for (auto& hook : hook_list_it->second) - hook(param, context); + { + try + { + hook(param, context); + } + catch (runtime_error&) {} + } } } diff --git a/src/window.cc b/src/window.cc index f123f6b5..ff583ea3 100644 --- a/src/window.cc +++ b/src/window.cc @@ -464,11 +464,7 @@ IncrementalInserter::~IncrementalInserter() move_cursor(DisplayCoord(0, -1)); m_window.push_selections(); - try - { - m_window.hooks_manager().run_hook("InsertEnd", "", Context(m_window)); - } - catch (runtime_error& e) {} + m_window.hooks_manager().run_hook("InsertEnd", "", Context(m_window)); m_window.pop_selections(); assert(m_window.m_current_inserter == this);