Skip to content
Discussion options

You must be logged in to vote

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.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dpetka2001
Comment options

Comment options

You must be logged in to vote
1 reply
@drowning-cat
Comment options

Answer selected by Kaiser-Yang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants