diff options
author | Yomain | 2023-07-11 17:51:04 +0000 |
---|---|---|
committer | GitHub | 2023-07-11 17:51:04 +0000 |
commit | 8afc0282f28e73cf78d1bd7b11d78fd853ae2036 (patch) | |
tree | 6742e141f051d352ebe7017f15805613670864b9 /helix-term/src/application.rs | |
parent | 1adb19464f002926e1042027b41acef4c81585f6 (diff) |
Fix crash when cwd is deleted (#7185)
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r-- | helix-term/src/application.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 4c86a19f..546a57a9 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -163,7 +163,7 @@ impl Application { } else if !args.files.is_empty() { let first = &args.files[0].0; // we know it's not empty if first.is_dir() { - std::env::set_current_dir(first).context("set current dir")?; + helix_loader::set_current_working_dir(first.clone())?; editor.new_file(Action::VerticalSplit); let picker = ui::file_picker(".".into(), &config.load().editor); compositor.push(Box::new(overlaid(picker))); |