on master help sign in
Set CWD when editor is started with a directory (#849)
c71b494Omnikar
helix-term/src/application.rs+1
@@ -100,6 +100,7 @@ impl Application {
100 if !args.files.is_empty() {
100 if !args.files.is_empty() {
101 let first = &args.files[0]; // we know it's not empty
101 let first = &args.files[0]; // we know it's not empty
102 if first.is_dir() {
102 if first.is_dir() {
103+ std::env::set_current_dir(&first)?;
103 editor.new_file(Action::VerticalSplit);
104 editor.new_file(Action::VerticalSplit);
104 compositor.push(Box::new(ui::file_picker(first.clone())));
105 compositor.push(Box::new(ui::file_picker(first.clone())));
105 } else {
106 } else {