kyazdani42 / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nvim-tree closes when a dirty buffer is saved.

nyinyithann opened this issue · comments

macOS Catalina
version 10.15.7

Neovim version

Nvim-tree version
master branch, tag 1.6.7

Describe the bug
When a dirty buffer is saved, Nvimtree closes.

To Reproduce

  1. open nvimtree
  2. open a buffer and enter something
  3. save the buffer

Expected behavior
Nvim should stay open when buffers are saved.

I believe this issue is responsible for even more bugs.

I'm facing a bug where:

  1. Say you have installed a plugin that uses floating windows (e.g. telescope.nvim or which-key.nvim)
  2. You run nvim <directory> into your project folder. Since you just opened a folder, the buffer is gonna be a NvimTree buffer.
  3. Now try to open any telescope.nvim pickers and close it by pressing .
  4. When you close that floating window, the entire Neovim process will exit as well (this is the bug; this same issue occurs with which-key.nvim or any plugins that uses floating windows).

It turns out, this issue is related to the auto_close functionality.

NvimTree doesn't seem to be tracking open & dirty files correctly. It listens to Nvim's WinClosed autocmd, but something is wrong afterwards.

While this issue isn't fixed, you still can avoid suddenly losing your work by disabling auto_close at nvim_tree.setup{} (set it to false).

i think i might just remove this feature at some point because it causes too many weird behaviors.

should be working now, closing this. Can you confirm ?

ezoic increase your site revenue