chore: resolve undefined-field
This commit is contained in:
@@ -140,9 +140,12 @@ end)
|
|||||||
Api.tree.change_root_to_node = wrap_node(function(node)
|
Api.tree.change_root_to_node = wrap_node(function(node)
|
||||||
if node.name == ".." or node:is(RootNode) then
|
if node.name == ".." or node:is(RootNode) then
|
||||||
actions.root.change_dir.fn("..")
|
actions.root.change_dir.fn("..")
|
||||||
elseif node:is(DirectoryNode) then
|
else
|
||||||
|
node = node:as(DirectoryNode)
|
||||||
|
if node then
|
||||||
actions.root.change_dir.fn(node:last_group_node().absolute_path)
|
actions.root.change_dir.fn(node:last_group_node().absolute_path)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Api.tree.change_root_to_parent = wrap_node(actions.root.dir_up.fn)
|
Api.tree.change_root_to_parent = wrap_node(actions.root.dir_up.fn)
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ function Explorer:create_autocmds()
|
|||||||
callback = function()
|
callback = function()
|
||||||
appearance.setup()
|
appearance.setup()
|
||||||
view.reset_winhl()
|
view.reset_winhl()
|
||||||
self:draw()
|
self.renderer:draw()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user