RichString_appendChr: add parameter to set attributes

Allows to set attributes when padding process fields in non-wide ncurses
mode.

Closes: #475
This commit is contained in:
Christian Göttsche
2021-01-13 19:22:33 +01:00
parent 78b993dbb4
commit 5fde0e0127
4 changed files with 21 additions and 12 deletions

View File

@ -201,7 +201,7 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
// The text in the bar is right aligned;
// Pad with maximal spaces and then calculate needed starting position offset
RichString_begin(bar);
RichString_appendChr(&bar, ' ', w);
RichString_appendChr(&bar, 0, ' ', w);
RichString_appendWide(&bar, 0, buffer);
int startPos = RichString_sizeVal(bar) - w;
if (startPos > w) {