commit a5c55d200b18a08341114d34bb2badfac97a54ad
parent 462f7aaa8ea683114726d5f189f238911eb4819b
Author: glepnir <glephunter@gmail.com>
Date: Mon, 23 Jun 2025 20:41:31 +0800
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.
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua
@@ -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',
},
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua
@@ -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()