feat: colour each bucket in the summary, not the whole line #22
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/colour-the-summary"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Checklist
Problem
The whole summary took the worst bucket's colour, so
1 fail, 4 skipped, 36/41 passingwas red end to end — including the 36 that passed.Solution
Each count carries its own group and the commas stay plain.
b:ci.statusnow holds'statusline'markup instead of bare text. That iswhat the
%{%…%}form is for, and it is how the single job symbol was alreadybeing coloured — just one level up, in the winbar string. Moving it to the
source lets one value carry more than one colour:
status_hlgoes away with it, since nothing needs telling afterwards how topaint a value that already knows. So does the worst-bucket search in
summarize, which existed only to pick that one colour.The winbar painted the entire summary in the worst bucket's colour, so "1 fail, 4 skipped, 36/41 passing" was red from end to end, including the part that was passing. Each count now carries its own, and the commas stay plain. b:ci.status holds 'statusline' markup rather than bare text, which is what the %{%…%} form exists for and is how the single symbol was already being coloured, one level up in the winbar string. Doing it at the source lets a value carry more than one colour, and status_hl goes away with it: nothing needs to be told afterwards how to paint something that already knows. Dropping it also removes the worst-bucket search, which existed only to decide that one colour.