mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(picker.actions): ensure the current window is updated after tabdrop (#2326)
## Description
Update the winid (in the `win` variable) after `tab drop`.
## Related Issue(s)
Without this patch, when the user set `confirm` to `{ action =
"confirm", cmd = "tabdrop" }` and jump to a location in a different tab,
since the `win` is still pointing to the original window (tab), there'd
be a `Cursor position outside buffer` error.
This commit is contained in:
parent
de2a8f94e5
commit
b30121bfce
1 changed files with 1 additions and 0 deletions
|
|
@ -89,6 +89,7 @@ function M.jump(picker, _, action)
|
|||
drop[#drop + 1] = vim.fn.fnameescape(path)
|
||||
end
|
||||
vim.cmd(cmd .. " " .. table.concat(drop, " "))
|
||||
win = vim.api.nvim_get_current_win()
|
||||
else
|
||||
for i, item in ipairs(items) do
|
||||
-- load the buffer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue