mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
fix(ui): s/format_entry/format_item to match docs (#15819)
Follow up to https://github.com/neovim/neovim/pull/15771
This commit is contained in:
committed by
GitHub
parent
63fde086d9
commit
9ca7b6b71a
@@ -20,9 +20,9 @@ function M.select(items, opts, on_choice)
|
||||
}
|
||||
opts = opts or {}
|
||||
local choices = {opts.prompt or 'Select one of:'}
|
||||
local format_entry = opts.format_entry or tostring
|
||||
local format_item = opts.format_item or tostring
|
||||
for i, item in pairs(items) do
|
||||
table.insert(choices, string.format('%d: %s', i, format_entry(item)))
|
||||
table.insert(choices, string.format('%d: %s', i, format_item(item)))
|
||||
end
|
||||
local choice = vim.fn.inputlist(choices)
|
||||
if choice < 1 or choice > #items then
|
||||
|
||||
Reference in New Issue
Block a user