Skip to content

Commit 1bbb6af

Browse files
committed
Fix the actual logic
1 parent ddcad00 commit 1bbb6af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

RichString.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ void RichString_setAttrn_preserveWithStandout(RichString* this, int attrs, int s
277277
// If current char is not a space and its ColorPair Index is not the default 0,
278278
// apply our own attrToPass with STANDOUT + optionally ITALICS,
279279
// instead of the passed attrs, which has the BG highlight color
280-
*ch |= (ch != L' ' && currentCharPairNum != 0)
281-
? attrToPass
282-
: (unsigned int)attrs;
280+
*ch = ((*ch & A_CHARTEXT) != L' ' && currentCharPairNum != 0)
281+
? *ch | attrToPass
282+
: (*ch & A_CHARTEXT) | (unsigned int)attrs;
283283
ch++;
284284
}
285285
}

0 commit comments

Comments
 (0)