@@ -156,9 +156,6 @@ impl Application {
156 let editor_view = Box::new(ui::EditorView::new(Keymaps::new(keys)));
156 let editor_view = Box::new(ui::EditorView::new(Keymaps::new(keys)));
157 compositor.push(editor_view);
157 compositor.push(editor_view);
159− if let Some(path) = args.working_directory {
160− helix_loader::set_current_working_dir(path)?
162 if args.load_tutor {
159 if args.load_tutor {
163 let path = helix_loader::runtime_file(Path::new("tutor"));
160 let path = helix_loader::runtime_file(Path::new("tutor"));
164 editor.open(&path, Action::VerticalSplit)?;
161 editor.open(&path, Action::VerticalSplit)?;
@@ -167,7 +164,7 @@ impl Application {
167 } else if !args.files.is_empty() {
164 } else if !args.files.is_empty() {
168 let first = &args.files[0].0; // we know it's not empty
165 let first = &args.files[0].0; // we know it's not empty
169 if first.is_dir() {
166 if first.is_dir() {
170− helix_loader::set_current_working_dir(first.clone())?;
167+ // NOTE: The working directory is already set to args.files[0] in main()
171 editor.new_file(Action::VerticalSplit);
168 editor.new_file(Action::VerticalSplit);
172 let picker = ui::file_picker(".".into(), &config.load().editor);
169 let picker = ui::file_picker(".".into(), &config.load().editor);
173 compositor.push(Box::new(overlaid(picker)));
170 compositor.push(Box::new(overlaid(picker)));