@@ -83,15 +83,18 @@ impl Application {
83 editor.new_file(Action::VerticalSplit);
83 editor.new_file(Action::VerticalSplit);
84 compositor.push(Box::new(ui::file_picker(first.clone())));
84 compositor.push(Box::new(ui::file_picker(first.clone())));
86+ let nr_of_files = args.files.len();
87+ editor.open(first.to_path_buf(), Action::VerticalSplit)?;
86 for file in args.files {
88 for file in args.files {
87 if file.is_dir() {
89 if file.is_dir() {
88 return Err(anyhow::anyhow!(
90 return Err(anyhow::anyhow!(
89 "expected a path to file, found a directory. (to open a directory pass it as first argument)"
91 "expected a path to file, found a directory. (to open a directory pass it as first argument)"
92− editor.open(file, Action::VerticalSplit)?;
94+ editor.open(file.to_path_buf(), Action::Load)?;
97+ editor.set_status(format!("Loaded {} files.", nr_of_files));
97 editor.new_file(Action::VerticalSplit);
100 editor.new_file(Action::VerticalSplit);