mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 06:36:24 +00:00
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
2 changed files with 5 additions and 0 deletions
|
|
@ -482,6 +482,10 @@ parse_sgr(Screen *screen, uint32_t *buf, unsigned int num, unsigned int *params,
|
|||
}
|
||||
}
|
||||
switch(state) {
|
||||
case START:
|
||||
params[num_params++] = 0;
|
||||
SEND_SGR;
|
||||
break;
|
||||
case COLOR1:
|
||||
case COLOR3:
|
||||
case NORMAL:
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ class TestParser(BaseTest):
|
|||
self.ae(s.cursor.bg, 7 << 24 | 8 << 16 | 9 << 8 | 2)
|
||||
pb('\033[0;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[38;5;1m', ('select_graphic_rendition', '38 5 1 '))
|
||||
pb('\033[38;2;1;2;3m', ('select_graphic_rendition', '38 2 1 2 3 '))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue