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 the cursor is on (not selected, on a single char) a path surrounded quotes followed by a comma, pressing gf opens a buffer pointing to a weird path.
// Trims some surrounding chars so that the actual file is opened.
let surrounding_chars:&[_] = &['\'','"','(',')'];
paths.clear();
paths.push(
current_word
.fragment(text_slice)
.trim_matches(surrounding_chars)
.to_string(),
);
The problem is not with quotes, but with the comma. I added a comma as another separator and it works.
let surrounding_chars:&[_] = &['\'','"','(',')',','];
However, I think it's more like hotfix and not desire solution. What do you say (question to maintainers)? Would this be an acceptable solution or should it only remove the comma if it is at the end of the selection?
Summary
When the cursor is on (not selected, on a single char) a path surrounded quotes followed by a comma, pressing gf opens a buffer pointing to a weird path.
Example scene
With cursor at the
^
marker (no selection), pressing gf opens a buffer withkitty/.config/kitty/kitty.conf",
as the path.Reproduction Steps
.config/helix
'.config/helix'
'.config/helix',
.config/helix,
Helix log
No response
Platform
macOS
Terminal Emulator
kitty 0.26.5
Helix Version
helix 22.12 (e2a1a97)
The text was updated successfully, but these errors were encountered: