Fix handling of empty SGR code
Was broken by refactoring to support colons in SGR codes
This commit is contained in:
parent
c0114d5e4e
commit
3cb74a25ba
@ -482,6 +482,10 @@ parse_sgr(Screen *screen, uint32_t *buf, unsigned int num, unsigned int *params,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch(state) {
|
switch(state) {
|
||||||
|
case START:
|
||||||
|
params[num_params++] = 0;
|
||||||
|
SEND_SGR;
|
||||||
|
break;
|
||||||
case COLOR1:
|
case COLOR1:
|
||||||
case COLOR3:
|
case COLOR3:
|
||||||
case NORMAL:
|
case NORMAL:
|
||||||
|
|||||||
@ -133,6 +133,7 @@ class TestParser(BaseTest):
|
|||||||
self.ae(s.cursor.bg, 7 << 24 | 8 << 16 | 9 << 8 | 2)
|
self.ae(s.cursor.bg, 7 << 24 | 8 << 16 | 9 << 8 | 2)
|
||||||
pb('\033[0;2m', *sgr('0 2'))
|
pb('\033[0;2m', *sgr('0 2'))
|
||||||
pb('\033[;2m', *sgr('0 2'))
|
pb('\033[;2m', *sgr('0 2'))
|
||||||
|
pb('\033[m', *sgr('0 '))
|
||||||
pb('\033[1;;2m', *sgr('1 0 2'))
|
pb('\033[1;;2m', *sgr('1 0 2'))
|
||||||
pb('\033[38;5;1m', ('select_graphic_rendition', '38 5 1 '))
|
pb('\033[38;5;1m', ('select_graphic_rendition', '38 5 1 '))
|
||||||
pb('\033[38;2;1;2;3m', ('select_graphic_rendition', '38 2 1 2 3 '))
|
pb('\033[38;2;1;2;3m', ('select_graphic_rendition', '38 2 1 2 3 '))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user