mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(picker.undo): set initial target to the current undo entry. See #2434
This commit is contained in:
parent
3038dac460
commit
dc245ef04e
1 changed files with 5 additions and 1 deletions
|
|
@ -489,7 +489,11 @@ function M.undo(opts, ctx)
|
|||
end)
|
||||
end)
|
||||
for i = #items, 1, -1 do
|
||||
cb(items[i])
|
||||
local item = items[i]
|
||||
cb(item)
|
||||
if item.current then
|
||||
ctx.picker.list:set_target(#items - i + 1)
|
||||
end
|
||||
end
|
||||
|
||||
while #items > 0 do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue