mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 01:46:18 +04:00
Avoid trailing s
in message when only 1 file is opened (#5189)
This commit is contained in:
parent
b1ca7ddf89
commit
24c3b00d10
@ -227,7 +227,11 @@ pub fn new(
|
|||||||
doc.set_selection(view_id, pos);
|
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,
|
// align the view to center after all files are loaded,
|
||||||
// does not affect views without pos since it is at the top
|
// does not affect views without pos since it is at the top
|
||||||
let (view, doc) = current!(editor);
|
let (view, doc) = current!(editor);
|
||||||
|
Loading…
Reference in New Issue
Block a user