kyazdani42 / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If nvim-tree is open and I quit my only buffer, it closes regardless of the changes being written to disk

embeddedpenguin opened this issue · comments

5.15.11-gentoo-x86_64 GNU/Linux

Neovim version

NVIM v0.6.1
Build type: Gentoo
LuaJIT 2.0.5
Compilation: /usr/bin/x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/var/tmp/portage/app-editors/neovim-0.6.1/work/neovim-0.6.1_build/config -I/var/tmp/portage/app-editors/neovim-0.6.1/work/neovim-0.6.1/src -I/usr/include -I/var/tmp/portage/app-editors/neovim-0.6.1/work/neovim-0.6.1_build/src/nvim/auto -I/var/tmp/portage/app-editors/neovim-0.6.1/work/neovim-0.6.1_build/include
Compiled by portage@localhost

Features: +acl +iconv +tui

Nvim-tree version
I'm assuming the master branch... I installed it via packer.

Describe the bug
If I have 1 window open with nvim tree open, and I hit enter :q, nvim doesn't check if the file is different than the file on disk. It basically bypasses the warning that the content hasn't been saved and closes immediately. Here's a video:

To Reproduce
Open a file to edit.
Toggle nvim-tree
switch back to the file to be edited and add some changes
:q to quit

Expected behavior
I would expect the normal vim behavior of vim telling me the file hasn't been written to disk.

Update to this issue: A temporary fix is disabling auto-close for nvim-tree.

auto-close needs a rewrite or a removal because it causes a lot of issues. I'll see what i do about this.

ezoic increase your site revenue