feat(man): allow opening pages in current window (#27861)

With :hide modifier, open page in current window.
This commit is contained in:
Tomasz N
2024-03-16 02:00:25 +01:00
committed by GitHub
parent 102a72a21e
commit 25e7299707
3 changed files with 12 additions and 4 deletions

View File

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