summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc3
1 files changed, 3 insertions, 0 deletions
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<InputModes::Normal*>(&current_mode()) == nullptr)
+ throw runtime_error{"repeating last insert not available in this context"};
+
Vector<Key> keys;
swap(keys, m_last_insert.keys);
ScopedSetBool disable_hooks(context().hooks_disabled(),