1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-24 20:13:00 +03:00

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();
}