Fix reentrency in Normal::handle_key

This commit is contained in:
Maxime Coste 2015-08-20 19:16:14 +01:00
parent ec88e394b0
commit 689494fb2f

View File

@ -244,9 +244,13 @@ public:
if (context().options()["autoinfo"].get<int>() >= 2 and context().has_ui()) if (context().options()["autoinfo"].get<int>() >= 2 and context().has_ui())
context().ui().info_show(key_to_str(key), it->docstring, CharCoord{}, context().ui().info_show(key_to_str(key), it->docstring, CharCoord{},
get_face("Information"), InfoStyle::Prompt); get_face("Information"), InfoStyle::Prompt);
it->func(context(), m_params);
} // reset m_params now to be reentrant
NormalParams params = m_params;
m_params = { 0, 0 }; m_params = { 0, 0 };
it->func(context(), params);
}
} }
context().hooks().run_hook("NormalKey", key_to_str(key), context()); context().hooks().run_hook("NormalKey", key_to_str(key), context());