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

Set the working directory before loading the config #8498

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

bjorn-ove
Copy link
Contributor

When you start the editor with a directory as the first argument, or specify -w, --working-dir <path> it loads .helix/config.toml as if you didn't specify it.

This fixes issue #8469

@the-mikedavis the-mikedavis merged commit a857480 into helix-editor:master Oct 9, 2023
6 checks passed
@bjorn-ove bjorn-ove deleted the fix-issue-8469 branch October 10, 2023 07:43
@boofexxx
Copy link
Contributor

boofexxx commented Oct 11, 2023

seems like the merge has introduced a bug
if you pass a directory as the first argument then it changes the current directory to it but it still tries to open the first argument which causes opening the first argument inside of the new CWD

e.g.: hx src/ makes it change the CWD to src and opens src inside of the src so we have src/src opened

@bjorn-ove
Copy link
Contributor Author

This is a good catch. I don't know how I missed it 😟. When the directory is changed, the later logic checks if the relative path is a directory, which now is false because the current directory has changed.

Will fix ASAP

@bjorn-ove
Copy link
Contributor Author

Fixed in #8520

danillos pushed a commit to danillos/helix that referenced this pull request Nov 21, 2023
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
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 this pull request may close these issues.

4 participants