fix: vim.ui.input can accept string as its first arg

This is not part of the documentation, but it is true.
This commit is contained in:
Steven Arcangeli 2021-12-03 22:42:33 -08:00
parent cbf7466a85
commit 37349af9e1
1 changed files with 3 additions and 0 deletions

View File

@ -15,6 +15,9 @@ return function(opts, on_confirm)
})
opts = opts or {}
if type(opts) ~= "table" then
opts = { prompt = tostring(opts) }
end
local config = global_config.get_mod_config("input", opts)
local bufnr = vim.api.nvim_create_buf(false, true)