Skip to content

Commit f09c518

Browse files
committed
parent is DirectoryNode
1 parent 3bc4d45 commit f09c518

File tree

8 files changed

+8
-7
lines changed

8 files changed

+8
-7
lines changed

lua/nvim-tree/actions/finders/find-file.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ function M.fn(path)
4343
return node.absolute_path == path_real or node.link_to == path_real
4444
end)
4545
:applier(function(node)
46+
---@cast node DirectoryNode
4647
local incremented_line = false
4748
if not node.group_next then
4849
line = line + 1

lua/nvim-tree/explorer/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ end
243243
---@private
244244
---@param handle uv.uv_fs_t
245245
---@param cwd string
246-
---@param node Node
246+
---@param node DirectoryNode
247247
---@param git_status table
248248
---@param parent Explorer
249249
function Explorer:populate_children(handle, cwd, node, git_status, parent)

lua/nvim-tree/node/directory-link.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ local DirectoryLinkNode = DirectoryNode:new()
99

1010
---Static factory method
1111
---@param explorer Explorer
12-
---@param parent Node
12+
---@param parent DirectoryNode
1313
---@param absolute_path string
1414
---@param link_to string
1515
---@param name string

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

1414
---Static factory method
1515
---@param explorer Explorer
16-
---@param parent Node?
16+
---@param parent DirectoryNode?
1717
---@param absolute_path string
1818
---@param name string
1919
---@param fs_stat uv.fs_stat.result|nil

lua/nvim-tree/node/factory.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local M = {}
88

99
---Factory function to create the appropriate Node
1010
---@param explorer Explorer
11-
---@param parent Node
11+
---@param parent DirectoryNode
1212
---@param absolute_path string
1313
---@param stat uv.fs_stat.result? -- on nil stat return nil Node
1414
---@param name string

lua/nvim-tree/node/file-link.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ local FileLinkNode = FileNode:new()
99

1010
---Static factory method
1111
---@param explorer Explorer
12-
---@param parent Node
12+
---@param parent DirectoryNode
1313
---@param absolute_path string
1414
---@param link_to string
1515
---@param name string

lua/nvim-tree/node/file.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ local FileNode = BaseNode:new()
99

1010
---Static factory method
1111
---@param explorer Explorer
12-
---@param parent Node
12+
---@param parent DirectoryNode
1313
---@param absolute_path string
1414
---@param name string
1515
---@param fs_stat uv.fs_stat.result?

lua/nvim-tree/node/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ local Class = require("nvim-tree.class")
1717
---@field git_status GitStatus?
1818
---@field hidden boolean
1919
---@field name string
20-
---@field parent Node?
20+
---@field parent DirectoryNode?
2121
---@field watcher Watcher?
2222
---@field diag_status DiagStatus?
2323
---@field is_dot boolean cached is_dotfile

0 commit comments

Comments
 (0)