fix(finder): don't trigger twice w/ inital_mode="insert" (#1886)
This commit is contained in:
@@ -438,8 +438,9 @@ function Picker:find()
|
||||
vim.schedule(function()
|
||||
-- startinsert! did not reliable do `A` no idea why, i even looked at the source code
|
||||
-- Example: live_grep -> type something -> quit -> Telescope pickers -> resume -> cursor of by one
|
||||
if vim.fn.mode() ~= "i" then
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<ESC>A", true, false, true), "n", true)
|
||||
local mode = vim.fn.mode()
|
||||
if mode ~= "i" then
|
||||
a.nvim_input(mode ~= "n" and "<ESC>A" or "A")
|
||||
end
|
||||
end)
|
||||
elseif self.initial_mode ~= "normal" then
|
||||
|
||||
Reference in New Issue
Block a user