neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 86b737649bb8c51649a21033c0e365f53f2bc04a
parent 9aab98a275cb6140540eecbe643a7943d700b58d
Author: hykerr <hykerr@proton.me>
Date:   Tue, 12 Nov 2024 12:26:07 +0100

fix(treesitter): add 'QuitPre' event to autocommands in inspect_tree

Problem: Quitting source buffer for ```:InspectTree``` command raises
```E855``` when source buffer and tree views are the only open buffers.

Solution: Add ```QuitPre``` event to autocmd handling closing/hiding the
source buffer to close all open tree views. This allows nvim to quit
when source and tree buffers are the only open windows.

Diffstat:
Mruntime/lua/vim/treesitter/dev.lua | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime/lua/vim/treesitter/dev.lua b/runtime/lua/vim/treesitter/dev.lua @@ -527,7 +527,7 @@ function M.inspect_tree(opts) end, }) - api.nvim_create_autocmd({ 'BufHidden', 'BufUnload' }, { + api.nvim_create_autocmd({ 'BufHidden', 'BufUnload', 'QuitPre' }, { group = group, buffer = buf, once = true,