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

gf incorrectly interprets path delimiters on WSL #8787

Open
cronsorcery opened this issue Dec 21, 2023 · 1 comment · May be fixed by #8819
Open

gf incorrectly interprets path delimiters on WSL #8787

cronsorcery opened this issue Dec 21, 2023 · 1 comment · May be fixed by #8819

Comments

@cronsorcery
Copy link

cronsorcery commented Dec 21, 2023

Describe the bug
After upgrading to 1.27.0 or later on WSL, gf keybinding opens a new file in the same directory as source file instead of opening the file under the cursor.
When saving this file, the name of the file is just an absolute path to the actual file, but with backslashes instead of forward slashes.

Earlier versions don't have this issue, and it is currently present in 1.27.1.

To Reproduce
Steps to reproduce the behavior:

  1. Open VSCode with vim extension 1.27.0 or above in WSL
  2. Create two files, one containing path to the second file
  3. Move cursor over this path and press gf
  4. See a new empty file

Expected behavior
The file under the cursor should open.

Screenshots

output.mp4

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.27.1
  • VSCode version: 1.85.1
  • OS: Windows_NT x64 10.0.22631 (WSL Ubuntu 22.04.3 LTS)

Additional context
Add any other context about the problem here.

@HenryTSZ
Copy link
Contributor

HenryTSZ commented Jan 7, 2024

It's due to this pr: feat: gf relative to project root by Foo-x · Pull Request #8705 · VSCodeVim/Vim, I think we can add a configuration: openFilePosition: 'relative' | 'absolute'

HenryTSZ pushed a commit to HenryTSZ/NVim that referenced this issue Jan 10, 2024
@HenryTSZ HenryTSZ linked a pull request Jan 10, 2024 that will close this issue
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