You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using gf on a visual mode selection, the selection should be used as the filename and the corresponding file should be opened. Instead the selection plus one additional character is used as the filename, causing the expected file not to be matched (and potentially non-expected files to be matched). It does seem to include any trailing character, including spaces, but not newlines.
(A typical example when you would want to use a visual mode selection with gf is when wanting to follow a path including spaces, where the spaces will prevent gf from finding the filename automatically.)
To Reproduce
Given an exsting file target.md and the file test.md with the following content:
[Link to target](target.md)
Open test.md
With cursor inside (target.md) type vi) to select the text target.md
Type gf to open file under cursor
VS Code will display the error "File: target.md) does not exist."
Expected behavior
The file target.md should open in a new tab.
Environment (please complete the following information):
Extension (VsCodeVim) version: 1.14.1
VSCode version: 1.44.2
OS: MacOS High Sierra
The text was updated successfully, but these errors were encountered:
Describe the bug
When using
gf
on a visual mode selection, the selection should be used as the filename and the corresponding file should be opened. Instead the selection plus one additional character is used as the filename, causing the expected file not to be matched (and potentially non-expected files to be matched). It does seem to include any trailing character, including spaces, but not newlines.(A typical example when you would want to use a visual mode selection with
gf
is when wanting to follow a path including spaces, where the spaces will preventgf
from finding the filename automatically.)To Reproduce
Given an exsting file
target.md
and the filetest.md
with the following content:test.md
(target.md)
typevi)
to select the texttarget.md
gf
to open file under cursorExpected behavior
The file
target.md
should open in a new tab.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: