Skip to content

Commit ad6cbc8

Browse files
committed
fix(input): schedule stopinsert. Fixes #1841
1 parent 67d690d commit ad6cbc8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/snacks/input.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ function M.input(opts, on_confirm)
182182
self:close()
183183
end,
184184
stopinsert = function()
185-
vim.cmd("stopinsert")
185+
vim.schedule(function()
186+
vim.cmd("stopinsert")
187+
end)
186188
end,
187189
confirm = function(self)
188190
confirm(self:text())

0 commit comments

Comments
 (0)