fix(picker.undo): set initial target to the current undo entry. See #2434

This commit is contained in:
Folke Lemaitre 2025-11-04 06:35:52 +01:00
parent 3038dac460
commit dc245ef04e
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -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