chore: resolve undefined-field
This commit is contained in:
@@ -26,12 +26,26 @@ end
|
|||||||
---@param node Node
|
---@param node Node
|
||||||
---@return boolean
|
---@return boolean
|
||||||
function M.is_modified(node)
|
function M.is_modified(node)
|
||||||
|
if not M.config.modified.enable then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
if not M._modified[node.absolute_path] then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
local dir = node:as(DirectoryNode)
|
local dir = node:as(DirectoryNode)
|
||||||
return node
|
if dir then
|
||||||
and M.config.modified.enable
|
if not M.config.modified.show_on_dirs then
|
||||||
and M._modified[node.absolute_path]
|
return false
|
||||||
and (not dir or M.config.modified.show_on_dirs)
|
end
|
||||||
and (not (dir and dir.open) or M.config.modified.show_on_open_dirs)
|
|
||||||
|
if dir.open and not M.config.modified.show_on_open_dirs then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
---A buffer exists for the node's absolute path
|
---A buffer exists for the node's absolute path
|
||||||
|
|||||||
Reference in New Issue
Block a user