mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-03 17:24:29 +00: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:
		@@ -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,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user