Skip to content

Commit 4a51fa6

Browse files
committed
use .. name for root node for compatibility
1 parent ab558ce commit 4a51fa6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lua/nvim-tree/explorer/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function Explorer:new(path)
5252
---@type Explorer
5353
local placeholder = nil
5454

55-
local o = DirectoryNode.new(self, placeholder, nil, path, nil, nil)
55+
local o = DirectoryNode.new(self, placeholder, nil, path, "..", nil)
5656
---@cast o Explorer
5757

5858
o.explorer = self

lua/nvim-tree/node/directory.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ local DirectoryNode = BaseNode:new()
1313
---@param explorer Explorer
1414
-----@param parent DirectoryNode -- TODO #2871 #2886
1515
---@param absolute_path string
16-
---@param name string|nil
16+
---@param name string
1717
---@param fs_stat uv.fs_stat.result|nil
1818
---@return DirectoryNode
1919
function DirectoryNode:new(explorer, parent, absolute_path, name, fs_stat)

lua/nvim-tree/node/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ local git = require("nvim-tree.git")
1010
---@field git_status GitStatus|nil
1111
---@field hidden boolean
1212
---@field is_dot boolean
13-
---@field name string|nil
13+
---@field name string
1414
---@field parent DirectoryNode|nil
1515
---@field watcher Watcher|nil
1616
---@field diag_status DiagStatus|nil

0 commit comments

Comments
 (0)