Closed pipoprods closed 1 month ago
🤞🏿 let's hope nothing breaks, thanks for the PR
I wonder if this is the culprit of some weird behaviors I'm seeing lately... I have an autocmd to set the term in insert mode on BufEnter
and that just stopped working. Sometimes it fails to leave insert mode either. All of this is just random. I couldn't figure out yet what triggers these problems.
@augustocdias Did you try postponing your autocmd with a vim.schedule
? Does the behavior change?
Could you post a relevant part of your config so I can test it on my side?
@pipoprods this is the toggleterm config: https://github.com/augustocdias/dotfiles/blob/main/.config/nvim/lua/setup/toggleterm.lua
and those are my autocmds:
https://github.com/augustocdias/dotfiles/blob/main/.config/nvim/lua/setup/autocommand.lua#L2-L32
I can't find a consistent way to reproduce it... I also have an issue sometimes where the term just doesn't leave insert mode... I have to kill it and start it again.
I'm using quick-access shortcuts to switch to a given terminal:
With this setup, every time I switch from one terminal to another, the terminal is placed in normal mode.
This PR postpones the
set_mode
command so the mode gets what is expected.