Fix mode line inconsistency between normal and insert modes

In normal mode, the mode line contains "1 sel" or "n sels (k)" when n > 1,
whereas in insert mode, it contains "n sels (k)" even for n == 1. Change
the contents in insert mode to match normal mode.
This commit is contained in:
Chris Webb 2021-12-11 12:11:08 +00:00
parent 558d809a34
commit 4a10220db8

View File

@ -1443,7 +1443,8 @@ public:
auto main_index = context().selections().main_index();
return {AtomList{ { "insert", context().faces()["StatusLineMode"] },
{ " ", context().faces()["StatusLine"] },
{ format( "{} sels ({})", num_sel, main_index + 1),
{ num_sel == 1 ? format("{} sel", num_sel)
: format("{} sels ({})", num_sel, main_index + 1),
context().faces()["StatusLineInfo"] } }};
}