mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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.
This commit is contained in:
parent
9aab98a275
commit
86b737649b
@ -527,7 +527,7 @@ function M.inspect_tree(opts)
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
api.nvim_create_autocmd({ 'BufHidden', 'BufUnload' }, {
|
api.nvim_create_autocmd({ 'BufHidden', 'BufUnload', 'QuitPre' }, {
|
||||||
group = group,
|
group = group,
|
||||||
buffer = buf,
|
buffer = buf,
|
||||||
once = true,
|
once = true,
|
||||||
|
Loading…
Reference in New Issue
Block a user