fix(find-file): match folders with prefix, not containing the node
avoid opening folders matching part of the string (/dev matching /home/dev for instance)
This commit is contained in:
@@ -29,7 +29,7 @@ function M.fn(fname)
|
|||||||
return i
|
return i
|
||||||
end
|
end
|
||||||
|
|
||||||
local path_matches = node.nodes and utils.str_find(fname, node.absolute_path..utils.path_separator)
|
local path_matches = node.nodes and vim.startswith(fname, node.absolute_path..utils.path_separator)
|
||||||
if path_matches then
|
if path_matches then
|
||||||
if not node.open then
|
if not node.open then
|
||||||
node.open = true
|
node.open = true
|
||||||
|
|||||||
Reference in New Issue
Block a user