feat(git): support DA state, fix(#1822): test directory capable of watching before presenting it (#1905)
* fix(#1822): test directory capable of watching before presenting it (#1901) * feat(git): support `DA` state Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
@@ -8,6 +8,7 @@ local git = require "nvim-tree.git"
|
||||
local log = require "nvim-tree.log"
|
||||
|
||||
local NodeIterator = require "nvim-tree.iterators.node-iterator"
|
||||
local Watcher = require "nvim-tree.watcher"
|
||||
|
||||
local M = {}
|
||||
|
||||
@@ -86,7 +87,7 @@ function M.reload(node, git_status, unloaded_bufnr)
|
||||
end
|
||||
|
||||
if not nodes_by_path[abs] then
|
||||
if t == "directory" and vim.loop.fs_access(abs, "R") then
|
||||
if t == "directory" and vim.loop.fs_access(abs, "R") and Watcher.is_fs_event_capable(abs) then
|
||||
local folder = builders.folder(node, abs, name)
|
||||
nodes_by_path[abs] = folder
|
||||
table.insert(node.nodes, folder)
|
||||
|
||||
Reference in New Issue
Block a user