Vim
Vim copied to clipboard
`gf` incorrectly interprets path delimiters on WSL
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:
- Open VSCode with vim extension
1.27.0
or above in WSL - Create two files, one containing path to the second file
- Move cursor over this path and press
gf
- See a new empty file
Expected behavior The file under the cursor should open.
Screenshots
https://github.com/VSCodeVim/Vim/assets/80540375/4fc28a14-0e0f-4e99-ac6f-a71cce0c00f7
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.
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'