summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-08-20 19:16:14 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-08-20 19:16:14 +0100
commit689494fb2fe6bb368c1c11c400375503b5041c7a (patch)
treedac679ef99756a28e7a539c85984f552b499af38 /src/input_handler.cc
parentec88e394b03cf528fe1ed3146fd40a934876c77e (diff)
Fix reentrency in Normal::handle_key
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index 4b4bd300..8ef17af9 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -244,9 +244,13 @@ public:
if (context().options()["autoinfo"].get<int>() >= 2 and context().has_ui())
context().ui().info_show(key_to_str(key), it->docstring, CharCoord{},
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 };
+
+ it->func(context(), params);
}
- m_params = { 0, 0 };
}
context().hooks().run_hook("NormalKey", key_to_str(key), context());