IncrementalInserter: catch exception thrown by the hook
This commit is contained in:
parent
6c817c8117
commit
70bb4847ee
|
@ -455,12 +455,16 @@ IncrementalInserter::IncrementalInserter(Window& window, Mode mode)
|
||||||
|
|
||||||
IncrementalInserter::~IncrementalInserter()
|
IncrementalInserter::~IncrementalInserter()
|
||||||
{
|
{
|
||||||
HooksManager::instance().run_hook("WinInsertEnd", "", Context(m_window));
|
|
||||||
|
|
||||||
move_cursor(DisplayCoord(0, -1));
|
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);
|
assert(m_window.m_current_inserter == this);
|
||||||
m_window.m_current_inserter = nullptr;
|
m_window.m_current_inserter = nullptr;
|
||||||
|
|
||||||
m_window.m_buffer.end_undo_group();
|
m_window.m_buffer.end_undo_group();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user