Open konosubakonoakua opened 4 months ago
should fix #357
When I'm using <C-w>o
there is chance to trigger #357.
When I'm using
o there is chance to trigger https://github.com/MunifTanjim/nui.nvim/issues/357
Can you give me an example where this could happen? 🤔
There is a WinClosed
callback where self.winid
is set to nil
when window is closed. https://github.com/MunifTanjim/nui.nvim/blob/a3597dc88b53489d3fddbddbbd13787355253bb0/lua/nui/popup/init.lua#L233-L240
When I'm using o there is chance to trigger #357
Can you give me an example where this could happen? 🤔
There is a
WinClosed
callback whereself.winid
is set tonil
when window is closed.
It's hard to tell, mostly with neotree open and several horizontal windows, after <C-w>o
or <C-w>c
there is a chance to happen, not everytime, the only debug info is invalid window error
from nui.nvim
. 🤕
Maybe the win is close by some other plugins.
I'm wondering if we can produce a intentional invalid winid which is not nil
.
found something in neovim repo, not sure related or not. fix(treesitter): update window if inspected buffer is still open #28922
found something in neovim repo, not sure related or not. https://github.com/neovim/neovim/pull/28922/
I don't think that's related to nui.nvim
at all.
the only debug info is invalid window error from nui.nvim
Can you post that here? or maybe a recording? so that I can understand the issue better.
found something in neovim repo, not sure related or not. neovim/neovim#28922
I don't think that's related to
nui.nvim
at all.the only debug info is invalid window error from nui.nvim
Can you post that here? or maybe a recording? so that I can understand the issue better.
...x/.local/share/nvim/lazy/nui.nvim/lua/nui/popup/init.lua:168: Invalid window id: 1173
I just triggered this issue with this patch, this pr is not working. ðŸ˜
First step of solving it would be to find out how to reproduce it consistently.
I don't really have the time currently to further investigate why it's happening, but here is a way to consistently reproduce the issue using the huynle/ogpt.nvim
plugin:
folke/edgy.nvim
according to the plugins README (https://github.com/huynle/ogpt.nvim)OGPT
command<C-c>
)OGPT
If I do Lazy reload ogpt.nvim
in between the error does not appear and everything works as expected.
winid is not nil, not meaning it is valid.