-
-
Notifications
You must be signed in to change notification settings - Fork 626
#837 find file symlinks fixes #1093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lua/nvim-tree/actions/find-file.lua
Outdated
local stat, _ = uv.fs_stat(node.absolute_path) | ||
if not stat then | ||
break | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra safety check cannot hurt.
lua/nvim-tree/actions/find-file.lua
Outdated
return i | ||
end | ||
local abs_match = vim.startswith(fname_real, node.absolute_path .. utils.path_separator) | ||
local real_match = vim.startswith(fname_real, real_path .. utils.path_separator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could keep a "real path" on the node, however that seems too complicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a link_to
attributes for symlinks on node, maybe this is what you would like to use here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a
link_to
attributes for symlinks on node, maybe this is what you would like to use here ?
Goot thinking. I'll rework on the weekend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is now simpler, thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks :)
#837 and #1092 exposed some remaining issues with symlink resolution. This covers the find-file cases.
Branched off #1092. Please review / merge that first.