How to disable auto stop insert when there is no item in lines picker #1821
-
When I use lines picker to search lines in current buffer and there is no item for the input, it will back to normal mode automatically. Is this a bug or how it works? If this is not a bug, how to disable this feature? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I'm using LazyVim myself and just tried with a fresh LazyVim installation and this does not happen. It stays in |
Beta Was this translation helpful? Give feedback.
-
This seems a bug, I found that this may happen when I search for files sometimes. But I do not know how to make it reproduce stably. |
Beta Was this translation helpful? Give feedback.
-
I've found the reason. I have an autocmd: vim.api.nvim_create_autocmd('BufEnter', {
group = 'UserDIY',
callback = function()
if not vim.bo.modifiable and vim.api.nvim_get_mode().mode == 'i' then
utils.feedkeys('<esc>', 'n')
end
end,
}) This autocmd is to leave insert mode when in a buffer which is not modifiable, when I remove this autocmd, the problem disappears. But I don't know why this autocmd will infect picker's input buffer. |
Beta Was this translation helpful? Give feedback.
I've found the reason. I have an autocmd:
This autocmd is to leave insert mode when in a buffer which is not modifiable, when I remove this autocmd, the problem disappears.
But I don't know why this autocmd will infect picker's input buffer.