chore: resolve undefined-field

This commit is contained in:
Alexander Courtis
2024-10-26 15:09:32 +11:00
parent d663059c3e
commit 3595418a8d
2 changed files with 6 additions and 3 deletions

View File

@@ -140,8 +140,11 @@ end)
Api.tree.change_root_to_node = wrap_node(function(node)
if node.name == ".." or node:is(RootNode) then
actions.root.change_dir.fn("..")
elseif node:is(DirectoryNode) then
actions.root.change_dir.fn(node:last_group_node().absolute_path)
else
node = node:as(DirectoryNode)
if node then
actions.root.change_dir.fn(node:last_group_node().absolute_path)
end
end
end)

View File

@@ -98,7 +98,7 @@ function Explorer:create_autocmds()
callback = function()
appearance.setup()
view.reset_winhl()
self:draw()
self.renderer:draw()
end,
})