aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/cmd_map_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ex_cmds/cmd_map_spec.lua')
-rw-r--r--test/functional/ex_cmds/cmd_map_spec.lua28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/functional/ex_cmds/cmd_map_spec.lua b/test/functional/ex_cmds/cmd_map_spec.lua
index 77d025dcc7..acb76e382d 100644
--- a/test/functional/ex_cmds/cmd_map_spec.lua
+++ b/test/functional/ex_cmds/cmd_map_spec.lua
@@ -656,7 +656,6 @@ describe('mappings with <Cmd>', function()
end)
it('works in cmdline mode', function()
- cmdmap('<F2>', 'call setcmdpos(2)')
feed(':text<F3>')
eq('c', eval('m'))
-- didn't leave cmdline mode
@@ -768,5 +767,32 @@ describe('mappings with <Cmd>', function()
end)
+ it("doesn't crash when invoking cmdline mode recursively #8859", function()
+ cmdmap('<F2>', 'norm! :foo')
+ feed(':bar')
+ screen:expect([[
+ some short lines |
+ of test text |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ :bar^ |
+ ]])
+
+ feed('<f2>x')
+ screen:expect([[
+ some short lines |
+ of test text |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ :barx^ |
+ ]])
+ end)
+
end)