Closed alanoliveira closed 2 years ago
About the neovim I found out how to reproduce, so I created an issue on neovim repo https://github.com/neovim/neovim/issues/20450 .
Once it is fixed, do you think add a noautocmd
on all vim.cmd
calls could cause some undesired side effect?
Instead, I think a better approach is to just set eventignore
before starting any smart-splits stuff, then reset it on complete. I can make the ignored events list customizable.
@alanoliveira does a246c4f7b386c435a286b18bcdd0fd4dfb929ab5 fix it for you?
Thank you very much, that was fast!
Could you make it run only for resize events?
Its because when I move to a terminal buffer I want it to run a startinsert
, but when I'm just resizing I don't want it.
Yup, that makes sense, my mistake. Done.
Like a charm! thank you! :bow:
Issue
I notice if we have some buffer with a BufEnter autocommand, like
When we use any resize command the BufEnter is triggered.
As far as I could investigate it seems to be caused by
wincmd h|j|k|l|
on lua/smart-splits/api.lua.I tried to solve it preppending a
noautocmd
on the beginning ofwincmd
, but for somereason it not works on this line lua/smart-splits/api.lua#L53 (a neovim bug maybe).To reproduce
When space is pressed in normal mode a message with
aaa
andbbb
is displayed.Additional info