fix(cmdline): :checkhealth completion with multiple args (#35060)

This commit is contained in:
zeertzjq
2025-07-26 07:04:32 +08:00
committed by GitHub
parent 0a113013fb
commit 5de2ec76a3
2 changed files with 8 additions and 1 deletions

View File

@@ -2295,7 +2295,6 @@ static const char *set_context_by_cmdname(const char *cmd, cmdidx_T cmdidx, expa
break;
case CMD_checkhealth:
xp->xp_context = EXPAND_CHECKHEALTH;
xp->xp_pattern = (char *)arg;
break;
case CMD_retab:

View File

@@ -67,6 +67,14 @@ describe(':checkhealth', function()
assert_alive()
end)
it('cmdline completion works with multiple args #35054', function()
clear()
n.feed(':checkhealth vim.ls<Tab>')
eq('checkhealth vim.lsp', fn.getcmdline())
n.feed(' vim.prov<Tab>')
eq('checkhealth vim.lsp vim.provider', fn.getcmdline())
end)
it('vim.g.health', function()
clear {
args_rm = { '-u' },