aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/application.rs
diff options
context:
space:
mode:
authorYomain2023-07-11 17:51:04 +0000
committerGitHub2023-07-11 17:51:04 +0000
commit8afc0282f28e73cf78d1bd7b11d78fd853ae2036 (patch)
tree6742e141f051d352ebe7017f15805613670864b9 /helix-term/src/application.rs
parent1adb19464f002926e1042027b41acef4c81585f6 (diff)
Fix crash when cwd is deleted (#7185)
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs2
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)));