mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(picker.input): startinsert when starting the picker from terminal mode. See #2390
This commit is contained in:
parent
41da728f02
commit
b2054a3a73
1 changed files with 7 additions and 1 deletions
|
|
@ -51,7 +51,13 @@ function M.new(picker)
|
|||
|
||||
self.win:on("BufEnter", function()
|
||||
vim.bo[self.win.buf].buftype = "prompt"
|
||||
vim.cmd("startinsert!")
|
||||
if vim.fn.mode() == "t" then
|
||||
vim.schedule(function()
|
||||
vim.cmd("startinsert!")
|
||||
end)
|
||||
else
|
||||
vim.cmd("startinsert!")
|
||||
end
|
||||
end, { buf = true })
|
||||
|
||||
local ref = Snacks.util.ref(self)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue