Open ljie-PI opened 3 days ago
Added some debugging messages as follows:
And got these messages:
The vim_cmd
is under path
and should not change root, but now it seems not because of "/" doesn't match "\"
If I use telescope to open this file, everything goes well:
I proposed a PR(https://github.com/nvim-tree/nvim-tree.lua/pull/2962) to revert previous change and fix the current issues (which I think are more common and more severe)
I found the [issue #2862 is more likely an issue of neovim instead of nvim-tree.
In issue #2862, LandonHarter is trying to open C:\Users\${myname}\AppData\Local\nvim-data\site\pack\packer\start\nvim-tree.lua\app\\(pages\)\\(app\)\document\[id]\page.tsx
. Sharing some findings:
:e C:\Users\${myname}\AppData\Local\nvim-data\site\pack\packer\start\nvim-tree.lua\app\\(pages\)\\(app\)\document\\[id\]\page.tsx
, I can't open it:e C:\Users\${myname}\AppData\Local\nvim-data\site\pack\packer\start\nvim-tree.lua\app\\(pages\)\\(app\)\document\[id]\page.tsx
, not able to open neither:e C:\Users\${myname}\AppData\Local\nvim-data\site\pack\packer\start\nvim-tree.lua\app\[id]\page.tsx
, I can open the file:e C:\Users\${myname}\AppData\Local\nvim-data\site\pack\packer\start\nvim-tree.lua\app\\[id\]\page.tsx
, I can't open the fileSo the previous code (before the fix #2862 ) is correct. But the neovim itself doesn't work well if the "[" and "]" come after "(" and ")".
Previous fix used a work around to change "\" to "/" to make this case work, but broke some more common features. I think #2862 is a much more niche case. So can we first revert the PR?
I think for later release, we can deal with this specific case separately.
Now also made changes to fix #2862. It works for all cases (open file correctly, root not changed unexpectedly, telescope can list all buffers)
But telescope could not correctly open the files with both "()" and "[]" in path. May need changes in telescope or neovim itself to get that fixed.
linke the PR: https://github.com/nvim-tree/nvim-tree.lua/pull/2962
Description
With this change (https://github.com/nvim-tree/nvim-tree.lua/commit/45a93d99794fff3064141d5b3a50db98ce352697#diff-eeb21711fceb0abba1450bd1adcbecc4fd90cf8ce4d5d7a8233f886c1bebd41fR375), I found it doesn't work well on Windows for 2 cases:
<cmd>lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})<cr>
Neovim version
Operating system and version
Windows 11
Windows variant
Command Prompt
nvim-tree version
2a268f6
Clean room replication
Steps to reproduce
Expected behavior
No response
Actual behavior
No response