aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-03 08:58:49 +0800
committerGitHub <noreply@github.com>2022-04-03 08:58:49 +0800
commita783cdd68d4f2d282725ea60e869ddf639930dc3 (patch)
tree5bb97783e558fc81fe65fc4926934effbdcbb68f /test
parent2a466001401c5a6d67ca9e33ae9630939150d09f (diff)
downloadrneovim-a783cdd68d4f2d282725ea60e869ddf639930dc3.tar.gz
rneovim-a783cdd68d4f2d282725ea60e869ddf639930dc3.tar.bz2
rneovim-a783cdd68d4f2d282725ea60e869ddf639930dc3.zip
fix(ex_normal): spam \n in Ex mode only if in Cmdline mode (#17977)
When using :normal in Ex mode, the editor is no longer in Cmdline mode, but the exmode_active flag is still set, causing the wrong character to be spammed in Insert mode, leading to a hang.
Diffstat (limited to 'test')
-rw-r--r--test/functional/ex_cmds/normal_spec.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/ex_cmds/normal_spec.lua b/test/functional/ex_cmds/normal_spec.lua
new file mode 100644
index 0000000000..bc4e45ec62
--- /dev/null
+++ b/test/functional/ex_cmds/normal_spec.lua
@@ -0,0 +1,13 @@
+local helpers = require('test.functional.helpers')(after_each)
+local clear = helpers.clear
+local feed = helpers.feed
+local expect = helpers.expect
+
+before_each(clear)
+
+describe(':normal', function()
+ it('can get out of Insert mode if called from Ex mode #17924', function()
+ feed('gQnormal! Ifoo<CR>')
+ expect('foo')
+ end)
+end)