Skip to content

[Bug] NvimTreeFindFile do not reveal file in tree #953

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

Closed
younger-1 opened this issue Feb 9, 2022 · 3 comments · Fixed by #977
Closed

[Bug] NvimTreeFindFile do not reveal file in tree #953

younger-1 opened this issue Feb 9, 2022 · 3 comments · Fixed by #977

Comments

@younger-1
Copy link
Contributor

OS
Win10 19043

Neovim version
NVIM v0.6.1
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compiled by runneradmin@fv-az152-430
Features: -acl +iconv +tui

Nvim-tree version
f938bcb 2022-02-08 (HEAD -> master, origin/master, origin/HEAD) fix: cleanup all dirs when hijacking window [kiyan]

Describe the bug
In windows, after open any file which attached by any LS configed by nvim-lspconfig, NvimTreeFindFile do not work properly on any further opened files attached by same LS. That is I can open nvim-tree but can not reveal the file in nvim-tree.

To Reproduce

  1. Open a file in workspace and wait a few second until LS that attaches the file completes initialization
  2. Open other file attached by the same LS. Note that no matter how you open it (by e filename or by telescope or by goto definetion of LS), this file's bufname is a full path starting with lower case of driver letter which cause the problem
  3. NvimTreeFindFile or NvimTreeOpen can't put the cursor in that file in nvim-tree.

Expected behavior
NvimTreeFindFile or NvimTreeOpen can reveal the file in nvim-tree.

@younger-1
Copy link
Contributor Author

@kyazdani42
Copy link
Member

could you try to see what's the output of the TreeExplorer.cwd in nvim-tree ? Or if you could submit a patch for it, i'm not running windows :/

@younger-1
Copy link
Contributor Author

younger-1 commented Feb 14, 2022

TreeExplorer.cwd in nvim-tree is a full path starting with upper case of driver letter like C:\\Users\\younger\\.config\\nvim, while file's bufname is a full path starting with lower case of driver letter like c:\Users\younger\.config\nvim\lua\young\cfg\global.lua (echo nvim_buf_get_name(0))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants