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:
Mathias Fußenegger
2021-09-28 01:12:03 +02:00
committed by GitHub
parent 63fde086d9
commit 9ca7b6b71a
3 changed files with 4 additions and 4 deletions

View File

@@ -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