From 641acc59433f73e6bc64f9d04e98deae7d7c5ffc Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 27 Jun 2017 09:57:10 +0100 Subject: Do not allow repeating last insert when we are not in normal mode . is not accepted anymore. Note that are not repeatable currently anyway (That could be fixed, athough not trivial). Fixes #1469 --- src/input_handler.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/input_handler.cc') diff --git a/src/input_handler.cc b/src/input_handler.cc index 217f3a5c..2a14fc71 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -1430,6 +1430,9 @@ void InputHandler::repeat_last_insert() if (m_last_insert.keys.empty()) return; + if (dynamic_cast(¤t_mode()) == nullptr) + throw runtime_error{"repeating last insert not available in this context"}; + Vector keys; swap(keys, m_last_insert.keys); ScopedSetBool disable_hooks(context().hooks_disabled(), -- cgit v1.2.3