Skip to content

Commit

Permalink
fix(input): empty string is converted to nil
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Dec 5, 2021
1 parent 5caa867 commit a0196a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/dressing/input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a0196a4

Please sign in to comment.