fix(explorer): confirm prompt now defaults to No

This commit is contained in:
Folke Lemaitre 2025-03-01 17:36:57 +01:00
parent e55ae37beb
commit f970cbb258
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -26,8 +26,8 @@ end
---@param prompt string
---@param fn fun()
function M.confirm(prompt, fn)
Snacks.picker.select({ "Yes", "No" }, { prompt = prompt }, function(_, idx)
if idx == 1 then
Snacks.picker.select({ "No", "Yes" }, { prompt = prompt }, function(_, idx)
if idx == 2 then
fn()
end
end)