Closed ofseed closed 5 months ago
Thanks for the PR! Could you provide a minimal repro where vim.v.event.windows
is not set on WinResized
event?
It's a little difficult to find the minimal code snippet to reproduce it because kitty-scrollback needs a special method to launch. But I'm curious about it. I will figure out the reason when I'm free.
I think that if this is the case it likely should be addressed in kitty-scrollback.nvim, or is an upstream Neovim issue and should be dealt with there - vvars should always be set in autocmd handlers...
@willothy Exactly, we should report this to neovim if vvars is not set.
Far simpler than I thought...
https://github.com/mikesmithgh/kitty-scrollback.nvim/blob/12f7687ac049d46a987c39b2b4f657fdf540fa4e/lua/kitty-scrollback/windows.lua#L134
It's just :doautocmd WinResized
manually, so vim.v.event.windows
is nil, not an upstream issue.
Need to be fixed here, or ask its author not to rely on this?
Seems quite impossible, but the window may not exist when
WinSized
is triggered. I don't know the reason but I think avoiding this situation is acceptable.In my case, this may be because of the plugin: https://github.com/mikesmithgh/kitty-scrollback.nvim/blob/fd75b297d82e6fb5fe724373cd95d2422b31d7b9/lua/kitty-scrollback/autocommands.lua#L55-L82