Skip to content

Commit bfac4e3

Browse files
committed
revert variable name change to ease multi-instance feature branch conflicts
1 parent f53c40d commit bfac4e3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lua/nvim-tree/explorer/init.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ function Explorer:reload(node, git_status)
139139
remain_childs[abs] = true
140140

141141
-- Type must come from fs_stat and not fs_scandir_next to maintain sshfs compatibility
142-
local type = stat and stat.type or nil
142+
local t = stat and stat.type or nil
143143

144144
-- Recreate node if type changes.
145145
if nodes_by_path[abs] then
146146
local n = nodes_by_path[abs]
147147

148-
if n.type ~= type then
148+
if n.type ~= t then
149149
utils.array_remove(node.nodes, n)
150150
explorer_node.node_destroy(n)
151151
nodes_by_path[abs] = nil
@@ -154,11 +154,11 @@ function Explorer:reload(node, git_status)
154154

155155
if not nodes_by_path[abs] then
156156
local new_child = nil
157-
if type == "directory" and vim.loop.fs_access(abs, "R") and Watcher.is_fs_event_capable(abs) then
157+
if t == "directory" and vim.loop.fs_access(abs, "R") and Watcher.is_fs_event_capable(abs) then
158158
new_child = builders.folder(node, abs, name, stat)
159-
elseif type == "file" then
159+
elseif t == "file" then
160160
new_child = builders.file(node, abs, name, stat)
161-
elseif type == "link" then
161+
elseif t == "link" then
162162
local link = builders.link(node, abs, name, stat)
163163
if link.link_to ~= nil then
164164
new_child = link

0 commit comments

Comments
 (0)