chore: resolve undefined-field
This commit is contained in:
@@ -200,7 +200,8 @@ function Marks:navigate(up)
|
|||||||
|
|
||||||
Iterator.builder(self.explorer.nodes)
|
Iterator.builder(self.explorer.nodes)
|
||||||
:recursor(function(n)
|
:recursor(function(n)
|
||||||
return n.open and n.nodes
|
local dir = n:as(DirectoryNode)
|
||||||
|
return dir and dir.open and dir.nodes
|
||||||
end)
|
end)
|
||||||
:applier(function(n)
|
:applier(function(n)
|
||||||
if n.absolute_path == node.absolute_path then
|
if n.absolute_path == node.absolute_path then
|
||||||
@@ -263,7 +264,7 @@ function Marks:navigate_select()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
local node = self.marks[choice]
|
local node = self.marks[choice]
|
||||||
if node and not node.nodes and not utils.get_win_buf_from_path(node.absolute_path) then
|
if node and not node:is(DirectoryNode) and not utils.get_win_buf_from_path(node.absolute_path) then
|
||||||
open_file.fn("edit", node.absolute_path)
|
open_file.fn("edit", node.absolute_path)
|
||||||
elseif node then
|
elseif node then
|
||||||
utils.focus_file(node.absolute_path)
|
utils.focus_file(node.absolute_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user