|
|
|
@ -156,9 +156,6 @@ impl Application {
|
|
|
|
|
let editor_view = Box::new(ui::EditorView::new(Keymaps::new(keys)));
|
|
|
|
|
compositor.push(editor_view);
|
|
|
|
|
|
|
|
|
|
if let Some(path) = args.working_directory {
|
|
|
|
|
helix_loader::set_current_working_dir(path)?
|
|
|
|
|
}
|
|
|
|
|
if args.load_tutor {
|
|
|
|
|
let path = helix_loader::runtime_file(Path::new("tutor"));
|
|
|
|
|
editor.open(&path, Action::VerticalSplit)?;
|
|
|
|
@ -167,7 +164,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() {
|
|
|
|
|
helix_loader::set_current_working_dir(first.clone())?;
|
|
|
|
|
// NOTE: The working directory is already set to args.files[0] in main()
|
|
|
|
|
editor.new_file(Action::VerticalSplit);
|
|
|
|
|
let picker = ui::file_picker(".".into(), &config.load().editor);
|
|
|
|
|
compositor.push(Box::new(overlaid(picker)));
|
|
|
|
|