Do not allow repeating last insert when we are not in normal mode
<a-;>. is not accepted anymore. Note that <a-;> are not repeatable currently anyway (That could be fixed, athough not trivial). Fixes #1469
This commit is contained in:
parent
ce8078ad73
commit
641acc5943
|
@ -1430,6 +1430,9 @@ void InputHandler::repeat_last_insert()
|
|||
if (m_last_insert.keys.empty())
|
||||
return;
|
||||
|
||||
if (dynamic_cast<InputModes::Normal*>(¤t_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(),
|
||||
|
|
1
test/regression/1469-assert-on-repeat-insert/cmd
Normal file
1
test/regression/1469-assert-on-repeat-insert/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
i<a-;>!echo tchou<ret><a-;>.
|
1
test/regression/1469-assert-on-repeat-insert/in
Normal file
1
test/regression/1469-assert-on-repeat-insert/in
Normal file
|
@ -0,0 +1 @@
|
|||
|
2
test/regression/1469-assert-on-repeat-insert/out
Normal file
2
test/regression/1469-assert-on-repeat-insert/out
Normal file
|
@ -0,0 +1,2 @@
|
|||
tchou
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
Loading…
Reference in New Issue
Block a user