fix: prompt uses first character of response - allow "yy" (#2357)

This commit is contained in:
Alexander Courtis 2023-08-06 13:26:10 +10:00 committed by GitHub
parent 0042886db0
commit 904f95cd9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,7 +148,7 @@ function M.prompt(prompt_input, prompt_select, items_short, items_long, callback
end)
else
vim.ui.input({ prompt = prompt_input, default = items_short[1] or "" }, function(item_short)
callback(item_short)
callback(item_short and item_short:sub(1, 1) or nil)
end)
end
end