mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(picker.man): make tab/split/vsplit work. Closes #2171
This commit is contained in:
parent
c01215c74f
commit
f39d1144e7
1 changed files with 9 additions and 2 deletions
|
|
@ -623,11 +623,18 @@ M.man = {
|
|||
finder = "system_man",
|
||||
format = "man",
|
||||
preview = "man",
|
||||
confirm = function(picker, item)
|
||||
confirm = function(picker, item, action)
|
||||
---@cast action snacks.picker.jump.Action
|
||||
picker:close()
|
||||
if item then
|
||||
vim.schedule(function()
|
||||
vim.cmd("Man " .. item.ref)
|
||||
local cmd = "Man " .. item.ref ---@type string
|
||||
if action.cmd == "vsplit" then
|
||||
cmd = "vert " .. cmd
|
||||
elseif action.cmd == "tab" then
|
||||
cmd = "tab " .. cmd
|
||||
end
|
||||
vim.cmd(cmd)
|
||||
end)
|
||||
end
|
||||
end,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue