Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid trailing s in message when only 1 file is opened (helix-edito…
Browse files Browse the repository at this point in the history
theteachr authored and Frederik Vestre committed Feb 6, 2023

Verified

This commit was signed with the committer’s verified signature.
DeckerSU DeckerSU
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
@@ -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);

0 comments on commit c344dd4

Please sign in to comment.