on_enabled might change mode, so assert Normal mode before

This commit is contained in:
Maxime Coste 2015-06-04 13:56:08 +01:00
parent b34d469b72
commit f39b450e94

View File

@ -1199,8 +1199,8 @@ void InputHandler::reset_normal_mode()
current_mode().on_disabled();
m_mode_stack.resize(1);
}
current_mode().on_enabled();
kak_assert(dynamic_cast<InputModes::Normal*>(&current_mode()) != nullptr);
current_mode().on_enabled();
}
void InputHandler::insert(InsertMode mode)