From 9ca7b6b71a1e98ff6a76270d165fc8f07763a0c3 Mon Sep 17 00:00:00 2001 From: Mathias Fußenegger Date: Tue, 28 Sep 2021 01:12:03 +0200 Subject: fix(ui): s/format_entry/format_item to match docs (#15819) Follow up to https://github.com/neovim/neovim/pull/15771 --- runtime/lua/vim/ui.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/lua/vim/ui.lua') diff --git a/runtime/lua/vim/ui.lua b/runtime/lua/vim/ui.lua index aebb63d56f..5eab20fc54 100644 --- a/runtime/lua/vim/ui.lua +++ b/runtime/lua/vim/ui.lua @@ -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 -- cgit