Skip to content

Commit

Permalink
refactor(ui): use vim.fn.confirm (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb authored Jun 7, 2024
1 parent c696296 commit 724db6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/rocks/operations/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,9 @@ end
local function prompt_retry_install_with_dev(arg_list, rock_name, version)
if version ~= "dev" then
vim.schedule(function()
local yesno = vim.fn.input("Could not find " .. rock_name .. ". Search for 'dev' version? y/n: ")
print("\n ")
if string.match(yesno, "^y.*") then
local choice =
vim.fn.confirm("Could not find " .. rock_name .. ". Search for 'dev' version?", "y/n", "y", "Question")
if choice == 1 then
arg_list = vim.iter(arg_list)
:filter(function(arg)
-- remove rock_name and version from arg_list
Expand Down

0 comments on commit 724db6e

Please sign in to comment.