aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/inccommand_user_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-06-01 20:17:52 +0800
committerGitHub <noreply@github.com>2022-06-01 20:17:52 +0800
commitf40adf770d090d12f7b14dd519fe649ada40bfe6 (patch)
treef4bb8fdf06c6491cadee34ef59a8ff11aabef633 /test/functional/ui/inccommand_user_spec.lua
parentc632f64e247c672e425f609bb47a9ab0517a4c31 (diff)
downloadrneovim-f40adf770d090d12f7b14dd519fe649ada40bfe6.tar.gz
rneovim-f40adf770d090d12f7b14dd519fe649ada40bfe6.tar.bz2
rneovim-f40adf770d090d12f7b14dd519fe649ada40bfe6.zip
fix(inccommand): do not try to preview an ambiguous command (#18827)
Diffstat (limited to 'test/functional/ui/inccommand_user_spec.lua')
-rw-r--r--test/functional/ui/inccommand_user_spec.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/ui/inccommand_user_spec.lua b/test/functional/ui/inccommand_user_spec.lua
index e2cd82943e..6c54ede582 100644
--- a/test/functional/ui/inccommand_user_spec.lua
+++ b/test/functional/ui/inccommand_user_spec.lua
@@ -5,6 +5,7 @@ local exec_lua = helpers.exec_lua
local insert = helpers.insert
local feed = helpers.feed
local command = helpers.command
+local assert_alive = helpers.assert_alive
-- Implements a :Replace command that works like :substitute.
local setup_replace_cmd = [[
@@ -326,4 +327,13 @@ describe("'inccommand' for user commands", function()
:.Replace text cats^ |
]])
end)
+
+ it('does not crash on ambiguous command #18825', function()
+ command('set inccommand=split')
+ command('command Reply echo 1')
+ feed(':R')
+ assert_alive()
+ feed('e')
+ assert_alive()
+ end)
end)