feat: add confirmation kind to select y/n

This commit is contained in:
kiyan
2022-07-18 14:38:32 +02:00
parent 1018a83e10
commit ba5c18dc2b
3 changed files with 10 additions and 6 deletions

View File

@@ -68,7 +68,7 @@ function M.fn(node)
return
end
vim.ui.select({ "y", "n" }, { prompt = "Remove " .. node.name .. " ?" }, function(choice)
vim.ui.select({ "y", "n" }, { kind = "confirmation", prompt = "Remove " .. node.name .. " ?" }, function(choice)
if choice == "y" then
if node.nodes ~= nil and not node.link_to then
local success = remove_dir(node.absolute_path)