-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvim: "Window was closed immediately" when opening floating window while opening fern in split window #474
Comments
I'm not sure, but it seems to me that there is a problem with fzf.vim. Is it really a problem on the fern side? |
As you can see from the minimal reproducer that only involves |
Oops sorry. I only saw the first example. I'll check it out.
|
Disabling auto viewer duplication feature solves the issue as a current workaround for now
|
So s:duplicate runs in the new floating window. This line (bwipeout-ing the new buffer with empty authority) makes the new floating window invalid. https://github.com/lambdalisue/fern.vim/blob/f7f41b5edd12f8fe3f358a2ada02d4662919684e/autoload/fern/internal/viewer.vim#L73 So the root cause is that, in a floating window, bwipeout-ing the current buffer destroys the window. I'm not sure if this is feature or bug. |
I guess this is expected behavior. Usual split windows do that too. I think the real problem is that this line fails. https://github.com/lambdalisue/fern.vim/blob/f7f41b5edd12f8fe3f358a2ada02d4662919684e/autoload/fern/internal/viewer.vim#LL72C1-L72C1 Relevant lines from
|
This is a bug because we don't need to count the number of popup windows to determine if we should invoke auto duplication feature. I fix that on #475 so please try it. @tomtomjhj |
fix: Do NOT count popup windows on auto duplication (#474)
In nvim, when I quickly open a fern buffer with
-opener=split
and immediately run a fzf.vim command that opens a floating window, I get the following error.This does not happen in vim.
Here is a minimal reproducer (tested in nvim 0.6, ..., 0.9):
Relevant line in nvim source:
https://github.com/neovim/neovim/blob/ebb10d624825468c1f75bd14725cce500974b673/src/nvim/api/win_config.c#L179
The text was updated successfully, but these errors were encountered: