goto_file: file path resolution relative to either the workspace or the current file #8126
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm currently working on a LaTeX project with the following structure:
The LaTeX compiler (I'm using
xelatex
) interprets paths relative to the main.tex file (which is at the root of the folder in this case). So even inbackground/chapters/main.tex
, I can't just type./ssl.tex
. Since the PR that implement relative paths ingoto_file_impl
, if I typemim
(match inside the brackets) and thengf
in one of the input statements on the left, helix will open the filechapters/background/chapters/background/file.tex
. So to select the file I need now takes extra keystrokes.This PR makes
goto_file_impl
first check if it can find the file relative to the current working directory, and if it doesn't exist, open it relative to the currently opened file.