mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
ncdirect_styles_set: restore italics/struck after sgr #1138
This commit is contained in:
parent
b7ea4e2359
commit
6a9029b60c
@ -678,6 +678,7 @@ int ncdirect_styles_off(ncdirect* n, unsigned stylebits){
|
||||
int ncdirect_styles_set(ncdirect* n, unsigned stylebits){
|
||||
uint32_t stylemask = stylebits;
|
||||
if(ncdirect_style_emit(n, n->tcache.sgr, stylemask, n->ttyfp) == 0){
|
||||
n->stylemask &= !(NCSTYLE_ITALIC | NCSTYLE_STRUCK); // sgr clears both
|
||||
if(term_setstyle(n->ttyfp, n->stylemask, stylemask, NCSTYLE_ITALIC,
|
||||
n->tcache.italics, n->tcache.italoff)){
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user