fix(cmd): bar "|" not allowed after :fclose #34613

Problem: `:fclose` command failed when used with trailing `|` bar.
Solution: Add `TRLBAR` flag to fclose command to support trailing bar.
This commit is contained in:
glepnir
2025-06-23 20:41:31 +08:00
committed by GitHub
parent 462f7aaa8e
commit a5c55d200b
2 changed files with 3 additions and 1 deletions

View File

@ -1052,7 +1052,7 @@ M.cmds = {
},
{
command = 'fclose',
flags = bit.bor(BANG, RANGE),
flags = bit.bor(BANG, RANGE, TRLBAR),
addr_type = 'ADDR_OTHER',
func = 'ex_fclose',
},

View File

@ -10654,6 +10654,8 @@ describe('float window', function()
|
]])
end
-- allow use with trailing bar
eq('hello', n.exec_capture('fclose | echo "hello"'))
end)
it('correctly placed in or above message area', function()