From df4cb473fc22430731c73e335956d47c1ae10895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E?= Date: Tue, 30 Jan 2024 10:23:55 +0800 Subject: [PATCH] feat(ui): use `vim.fn.comfirm` for non-popup confirmation prompts (#1328) Co-authored-by: cseickel --- lua/neo-tree/ui/inputs.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lua/neo-tree/ui/inputs.lua b/lua/neo-tree/ui/inputs.lua index 91ca4900f..a98c2f38c 100644 --- a/lua/neo-tree/ui/inputs.lua +++ b/lua/neo-tree/ui/inputs.lua @@ -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