IncrementalInserter: catch exception thrown by the hook

This commit is contained in:
Maxime Coste 2011-12-21 18:57:07 +00:00
parent 6c817c8117
commit 70bb4847ee

View File

@ -455,12 +455,16 @@ IncrementalInserter::IncrementalInserter(Window& window, Mode mode)
IncrementalInserter::~IncrementalInserter()
{
HooksManager::instance().run_hook("WinInsertEnd", "", Context(m_window));
move_cursor(DisplayCoord(0, -1));
try
{
HooksManager::instance().run_hook("WinInsertEnd", "", Context(m_window));
}
catch (runtime_error& e) {}
assert(m_window.m_current_inserter == this);
m_window.m_current_inserter = nullptr;
m_window.m_buffer.end_undo_group();
}