-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Reveal doesn't work with slach (/
) separated path on Windows
#478
Comments
What the value of You can check it by
On the buffer opened via diffview. |
@lambdalisue It shows the file path correctly. |
Nerdtree works with this situation though. Here is the link to the implementation: https://github.com/preservim/nerdtree/blob/c46e12a886b4a6618a9e834c90f6245952567115/autoload/nerdtree/ui_glue.vim#L296 |
I could not reproduce the issue. Please make a minimal vimrc. CleanShot.2023-07-06.at.19.05.48.mp4 |
@lambdalisue Sorry for not clear enough about the repro steps. As long as you open the buffer before using diffview to open it, the issue cannot occur. So after git changes, simply reopen vim and use diffview to jump to that file directly. |
Could not reproduce. CleanShot.2023-07-07.at.13.59.36.mp4 |
Here is a minimum init.lua for neovim. I figured out why you cannot repro. The issue exists only on windows powershell and not in wsl2 ubuntu.
|
Then, could you find the difference of |
@lambdalisue There is a difference! |
The same difference exists on WSL2 but that does not seem to be a problem. |
So diffview opens a path separated by slash ( |
@lambdalisue Exactly. Interesting that the buffer is opened succssfully with this path and NerdTree can still locate the file. |
/
) separated path on Windows
Thanks for this plugin. I recently switched from nerdtree, it is so much faster.
Here is the issue. If I open a file via Fern explorer or Telescope search, then I can trigger
Fern . -reveal=% -drawer -toggle
to reveal current file. However, if the buffer is opened via diffview, then reveal won't work, it will always open the root directory and focus the root folder.Steps to open a buffer via diffview:
use "sindrets/diffview.nvim"
:DiffviewOpen master
to diff against master branchgf
to go to selected file for editingThe text was updated successfully, but these errors were encountered: