* fix(#1629): nvim start with file named *NvimTree* opens tree instead of buffer
* Revert "fix(#1629): nvim start with file named *NvimTree* opens tree instead of buffer"
This reverts commit e7136078f7.
* fix(#1629): nvim start with file named *NvimTree* treats file as tree
* fix(#1629): nvim start with file named *NvimTree* treats file as tree
* fix(#1639): ensure tree autocommands match filetype as well as name
* fix(#1639): fix bad merge
* fix(#1639): ensure tree autocommands match filetype as well as name
This commit is contained in:
committed by
GitHub
parent
c995ce0878
commit
48992fd3e8
@@ -1,6 +1,7 @@
|
||||
local a = vim.api
|
||||
|
||||
local view = require "nvim-tree.view"
|
||||
local utils = require "nvim-tree.utils"
|
||||
local Iterator = require "nvim-tree.iterators.node-iterator"
|
||||
|
||||
local M = {
|
||||
@@ -30,7 +31,11 @@ local function remove_overlay()
|
||||
a.nvim_create_autocmd("WinLeave", {
|
||||
pattern = "NvimTree_*",
|
||||
group = a.nvim_create_augroup("NvimTree", { clear = false }),
|
||||
callback = view.close,
|
||||
callback = function()
|
||||
if utils.is_nvim_tree_buf(0) then
|
||||
view.close()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user