aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorOmnikar2021-10-16 01:04:26 +0000
committerGitHub2021-10-16 01:04:26 +0000
commitc71b49497d8fc8ee487b7cfeafb7392b71a13d17 (patch)
tree99641859b24b529c06c7daba7460018a1ac2da1d /helix-term/src
parent4d07eaa48bc4fc0c75e0346406fb6dedfc7db743 (diff)
Set CWD when editor is started with a directory (#849)
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/application.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 7667441b..b3fa79ee 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -100,6 +100,7 @@ impl Application {
if !args.files.is_empty() {
let first = &args.files[0]; // we know it's not empty
if first.is_dir() {
+ std::env::set_current_dir(&first)?;
editor.new_file(Action::VerticalSplit);
compositor.push(Box::new(ui::file_picker(first.clone())));
} else {