fix(input): empty string is converted to nil

This commit is contained in:
Steven Arcangeli 2021-12-04 16:43:12 -08:00
parent 5caa867d3d
commit a0196a49e4
1 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,9 @@ M.confirm = function(text)
local cursor = vim.api.nvim_win_get_cursor(0)
cursor[2] = cursor[2] + 1
vim.api.nvim_win_set_cursor(0, cursor)
if text == "" then
text = nil
end
vim.schedule_wrap(ctx.on_confirm)(text)
end