mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
Properly set italics/struck following sgr #1138
This commit is contained in:
parent
0ed8c0d234
commit
f82ad10667
@ -558,8 +558,9 @@ term_setstyles(FILE* out, uint32_t* curattr, const cell* c, bool* normalized,
|
||||
out, false) < 0){
|
||||
ret = -1;
|
||||
}
|
||||
// sgr will blow away italics/struck if they were set beforehand
|
||||
*curattr &= !(NCSTYLE_ITALIC | NCSTYLE_STRUCK);
|
||||
}
|
||||
// sgr will blow away italics/struck if they were set beforehand
|
||||
ret |= term_setstyle(out, *curattr, cellattr, NCSTYLE_ITALIC, italics, italoff);
|
||||
ret |= term_setstyle(out, *curattr, cellattr, NCSTYLE_STRUCK, struck, struckoff);
|
||||
*curattr = cellattr;
|
||||
|
@ -42,6 +42,12 @@ int main(void){
|
||||
ncplane_putstr_yx(n, y++, 0, "a ═ struck underline");
|
||||
ncplane_set_styles(n, NCSTYLE_STRUCK | NCSTYLE_BLINK);
|
||||
ncplane_putstr_yx(n, y++, 0, "a ═ struck blink");
|
||||
ncplane_set_styles(n, NCSTYLE_BOLD | NCSTYLE_REVERSE);
|
||||
ncplane_putstr_yx(n, y++, 0, "a ═ bold reverse");
|
||||
ncplane_set_styles(n, NCSTYLE_BOLD | NCSTYLE_UNDERLINE);
|
||||
ncplane_putstr_yx(n, y++, 0, "a ═ bold underline");
|
||||
ncplane_set_styles(n, NCSTYLE_BOLD | NCSTYLE_BLINK);
|
||||
ncplane_putstr_yx(n, y++, 0, "a ═ bold blink");
|
||||
ncplane_putstr_yx(n, y++, 0, "sleeping for 15s...");
|
||||
if(notcurses_render(nc)){
|
||||
goto err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user