Skip to content

Commit

Permalink
Avoid trailing s in message when only 1 file is opened (helix-edito…
Browse files Browse the repository at this point in the history
  • Loading branch information
theteachr authored and Frederik Vestre committed Feb 6, 2023
1 parent 99e94bc commit c344dd4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion helix-term/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,11 @@ impl Application {
doc.set_selection(view_id, pos);
}
}
editor.set_status(format!("Loaded {} files.", nr_of_files));
editor.set_status(format!(
"Loaded {} file{}.",
nr_of_files,
if nr_of_files == 1 { "" } else { "s" } // avoid "Loaded 1 files." grammo
));
// align the view to center after all files are loaded,
// does not affect views without pos since it is at the top
let (view, doc) = current!(editor);
Expand Down

0 comments on commit c344dd4

Please sign in to comment.