Skip to content

Commit

Permalink
Fix the actual logic
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j committed Sep 29, 2024
1 parent ddcad00 commit 1bbb6af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RichString.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ void RichString_setAttrn_preserveWithStandout(RichString* this, int attrs, int s
// If current char is not a space and its ColorPair Index is not the default 0,
// apply our own attrToPass with STANDOUT + optionally ITALICS,
// instead of the passed attrs, which has the BG highlight color
*ch |= (ch != L' ' && currentCharPairNum != 0)
? attrToPass
: (unsigned int)attrs;
*ch = ((*ch & A_CHARTEXT) != L' ' && currentCharPairNum != 0)
? *ch | attrToPass
: (*ch & A_CHARTEXT) | (unsigned int)attrs;
ch++;
}
}
Expand Down

0 comments on commit 1bbb6af

Please sign in to comment.