Skip to content
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

Call Resolve on the file's path when calling :NERDTreeFind. #896

Merged
merged 1 commit into from
Oct 25, 2018

Commits on Oct 11, 2018

  1. Call Resolve on the file's path when calling :NERDTreeFind.

    When :NERDTreeFind creates a tree, it resolves the file's path, and
    makes that its root. See :h resolve() for more info; it basically
    tracks down links to their ultimate source. Then :NERDTreeFind
    tries to find the file under that root, so it can be revealed. The
    problem is that it compares the file's unresolved path against the
    resolved path in the root. Here is the scenario:
    
    /tmp/ is a link to /private/tmp/
    :e /tmp/foo will open the file as expected
    :NERDTreeFind will first create a tree with a root of /private/tmp/
    Then it tries to find /tmp/foo, but it can't, because the path
    names don't match.
    
    This commit resolves /tmp/foo to the actual location of
    /private/tmp/foo; thus, it is able to find the file in the tree.
    Phil Runninger (mac) committed Oct 11, 2018
    Configuration menu
    Copy the full SHA
    f1dc134 View commit details
    Browse the repository at this point in the history