Add control code for resetting underline color to default
This commit is contained in:
parent
fc046d915d
commit
25aaf4331a
@ -52,6 +52,8 @@ typedef unsigned int index_type;
|
|||||||
#define CC_SHIFT 16
|
#define CC_SHIFT 16
|
||||||
#define UTF8_ACCEPT 0
|
#define UTF8_ACCEPT 0
|
||||||
#define UTF8_REJECT 1
|
#define UTF8_REJECT 1
|
||||||
|
#define UNDERCURL_CODE 6
|
||||||
|
#define DECORATION_FG_CODE 58
|
||||||
|
|
||||||
#define CURSOR_BLOCK 1
|
#define CURSOR_BLOCK 1
|
||||||
#define CURSOR_BEAM 2
|
#define CURSOR_BEAM 2
|
||||||
|
|||||||
@ -281,7 +281,7 @@ void select_graphic_rendition(Screen *self, unsigned int *params, unsigned int c
|
|||||||
self->cursor->italic = true; break;
|
self->cursor->italic = true; break;
|
||||||
case 4:
|
case 4:
|
||||||
self->cursor->decoration = 1; break;
|
self->cursor->decoration = 1; break;
|
||||||
case 6:
|
case UNDERCURL_CODE:
|
||||||
self->cursor->decoration = 2; break;
|
self->cursor->decoration = 2; break;
|
||||||
case 7:
|
case 7:
|
||||||
self->cursor->reverse = true; break;
|
self->cursor->reverse = true; break;
|
||||||
@ -300,10 +300,14 @@ void select_graphic_rendition(Screen *self, unsigned int *params, unsigned int c
|
|||||||
START_ALLOW_CASE_RANGE
|
START_ALLOW_CASE_RANGE
|
||||||
case 30 ... 37:
|
case 30 ... 37:
|
||||||
self->cursor->fg = ((attr - 30) << 8) | 1; break;
|
self->cursor->fg = ((attr - 30) << 8) | 1; break;
|
||||||
|
case 38:
|
||||||
|
SET_COLOR(fg);
|
||||||
case 39:
|
case 39:
|
||||||
self->cursor->fg = 0; break;
|
self->cursor->fg = 0; break;
|
||||||
case 40 ... 47:
|
case 40 ... 47:
|
||||||
self->cursor->bg = ((attr - 40) << 8) | 1; break;
|
self->cursor->bg = ((attr - 40) << 8) | 1; break;
|
||||||
|
case 48:
|
||||||
|
SET_COLOR(bg);
|
||||||
case 49:
|
case 49:
|
||||||
self->cursor->bg = 0; break;
|
self->cursor->bg = 0; break;
|
||||||
case 90 ... 97:
|
case 90 ... 97:
|
||||||
@ -311,12 +315,10 @@ START_ALLOW_CASE_RANGE
|
|||||||
case 100 ... 107:
|
case 100 ... 107:
|
||||||
self->cursor->bg = ((attr - 100 + 8) << 8) | 1; break;
|
self->cursor->bg = ((attr - 100 + 8) << 8) | 1; break;
|
||||||
END_ALLOW_CASE_RANGE
|
END_ALLOW_CASE_RANGE
|
||||||
case 38:
|
case DECORATION_FG_CODE:
|
||||||
SET_COLOR(fg);
|
|
||||||
case 48:
|
|
||||||
SET_COLOR(bg);
|
|
||||||
case 58:
|
|
||||||
SET_COLOR(decoration_fg);
|
SET_COLOR(decoration_fg);
|
||||||
|
case DECORATION_FG_CODE + 1:
|
||||||
|
self->cursor->decoration_fg = 0; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user