fix(man): pass modifiers also to :tag (#27878)

There aren't really many modifiers that take an effect on :tag (except
maybe :confirm, :unsilent, :verbose), but pass them for consistency.
This commit is contained in:
zeertzjq 2024-03-16 09:56:58 +08:00 committed by GitHub
parent 25e7299707
commit 59aadf33ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -716,11 +716,11 @@ function M.open_page(count, smods, args)
local target = ('%s(%s)'):format(name, sect)
local ok, ret = pcall(function()
smods.silent = true
smods.keepalt = true
if smods.hide or (smods.tab == -1 and find_man()) then
vim.cmd.tag({ target, mods = { silent = true, keepalt = true } })
vim.cmd.tag({ target, mods = smods })
else
smods.silent = true
smods.keepalt = true
vim.cmd.stag({ target, mods = smods })
end
end)