Replies: 9 comments
-
This isn't as much about buffers as it is about windows. When deleting file buffer will get removed together with window it's displayed in. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I am kind of new about neovim so I probably explain it wrong. To clarify I am not saying this is a bug for nvim-tree, might have to solve this from toggleterm but I wonder if there is a way to fix this from this plugin |
Beta Was this translation helpful? Give feedback.
-
Nothing to be sorry about. It is bit annoying indeed, every time I delete file its window will be removed as well making nvim-tree fullscreen. Maybe @alex-courtis will have an idea how to handle this. We could open empty buffer in new window I guess. Also I don't think it has anything to do with toggleterm. You most likely going to get the same behaviour without it. |
Beta Was this translation helpful? Give feedback.
-
I'm also getting a full screen nvim tree window when closing a buffer even when there are still more buffers to show. Any ideas of why this is happening? |
Beta Was this translation helpful? Give feedback.
-
I believe this is just default vim behaviour. It doesn't matter what those windows are. Close one window and others will expand to fit regained space. If only another one was left it will end up taking entire "window". I am bit afraid that difficulty of "quitting when nvim-tree is the only window left" will also apply to scenario when it would try to open new window with either last opened buffer if present or new no name buffer. Is aforementioned case the same as 'quit-if-last', @alex-courtis, or do you think it could be reliably implemented? |
Beta Was this translation helpful? Give feedback.
-
This is annoying behaviour, but it's just how vim works. There is a plugin to work around it: https://github.com/qpkorr/vim-bufkill
|
Beta Was this translation helpful? Give feedback.
-
That is indeed the same issue. vim events are only somewhat deterministic, in that other plugins and automation will change order or suppress events. I don't think this is something we could introduce as it will likely introduce a lot of bugs. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/famiu/bufdelete.nvim This one works too! |
Beta Was this translation helpful? Give feedback.
-
Today I learned. It's quite nice, however I can't move as I'm using the MRU features of bufkill. Not sure why they are not in a separate plugin... |
Beta Was this translation helpful? Give feedback.
-
Description
Hi , I have weird case that maybe you can help me fix.
I am using toggleterm and nvim-tree together.
Neovim version
Operating system and version
Windows 11(WSL Ubuntu)
nvim-tree version
latest
Minimal config
Steps to reproduce
Expected behavior
Actual behavior
nvim-tree leaves no buffer open
Beta Was this translation helpful? Give feedback.
All reactions