term_setstyles: fix up for new NCSTYLE_MASK #934

pull/937/head
nick black 4 years ago
parent 6bb8f447b5
commit 13eb63ada9
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -503,7 +503,7 @@ term_setstyles(FILE* out, uint32_t* curattr, const cell* c, bool* normalized,
int ret = 0;
// if only italics changed, don't emit any sgr escapes. xor of current and
// target ought have all 0s in the lower 8 bits if only italics changed.
if((cellattr ^ *curattr) & 0x00ff0000ul){
if((cellattr ^ *curattr) & 0xfful){
*normalized = true; // FIXME this is pretty conservative
// if everything's 0, emit the shorter sgr0
if(sgr0 && ((cellattr & NCSTYLE_MASK) == 0)){

Loading…
Cancel
Save