on master help sign in
Avoid trailing `s` in message when only 1 file is opened (#5189)
24c3b00Nick
helix-term/src/application.rs+5−1
@@ -227,7 +227,11 @@ impl Application {
227 doc.set_selection(view_id, pos);
227 doc.set_selection(view_id, pos);
228 }
228 }
229 }
229 }
230− editor.set_status(format!("Loaded {} files.", nr_of_files));
230+ editor.set_status(format!(
231+ "Loaded {} file{}.",
232+ nr_of_files,
233+ if nr_of_files == 1 { "" } else { "s" } // avoid "Loaded 1 files." grammo
234+ ));
231 // align the view to center after all files are loaded,
235 // align the view to center after all files are loaded,
232 // does not affect views without pos since it is at the top
236 // does not affect views without pos since it is at the top
233 let (view, doc) = current!(editor);
237 let (view, doc) = current!(editor);