Skip to content

Commit

Permalink
feat(ui): use vim.fn.comfirm for non-popup confirmation prompts (#1328
Browse files Browse the repository at this point in the history
)

Co-authored-by: cseickel <cseickel@gmail.com>
  • Loading branch information
konosubakonoakua and cseickel authored Jan 30, 2024
1 parent e578fe7 commit df4cb47
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lua/neo-tree/ui/inputs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,7 @@ M.confirm = function(message, callback)
input.prompt_type = "confirm"
M.show_input(input)
else
local opts = {
prompt = message .. " y/n: ",
}
vim.ui.input(opts, function(value)
callback(value == "y" or value == "Y")
end)
callback(vim.fn.confirm(message, "&Yes\n&No") == 1)
end
end

Expand Down

0 comments on commit df4cb47

Please sign in to comment.