mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Fix failing test
This commit is contained in:
@@ -2996,7 +2996,7 @@ screen_request_capabilities(Screen *self, char c, const char *query) {
|
|||||||
// SGR
|
// SGR
|
||||||
const char *s = cursor_as_sgr(self->cursor);
|
const char *s = cursor_as_sgr(self->cursor);
|
||||||
if (s && s[0]) shape = snprintf(buf, sizeof(buf), "1$r0;%sm", s);
|
if (s && s[0]) shape = snprintf(buf, sizeof(buf), "1$r0;%sm", s);
|
||||||
else shape = snprintf(buf, sizeof(buf), "1$r0m");
|
else shape = snprintf(buf, sizeof(buf), "1$rm");
|
||||||
} else if (strcmp("r", query) == 0) { // DECSTBM
|
} else if (strcmp("r", query) == 0) { // DECSTBM
|
||||||
shape = snprintf(buf, sizeof(buf), "1$r%u;%ur", self->margin_top + 1, self->margin_bottom + 1);
|
shape = snprintf(buf, sizeof(buf), "1$r%u;%ur", self->margin_top + 1, self->margin_bottom + 1);
|
||||||
} else if (strcmp("*x", query) == 0) { // DECSACE
|
} else if (strcmp("*x", query) == 0) { // DECSACE
|
||||||
|
|||||||
@@ -536,7 +536,7 @@ class TestParser(BaseTest):
|
|||||||
pb('\033P$qm\033\\', ('screen_request_capabilities', ord('$'), 'm'))
|
pb('\033P$qm\033\\', ('screen_request_capabilities', ord('$'), 'm'))
|
||||||
self.ae(c.wtcbuf, b'\033P1$rm\033\\')
|
self.ae(c.wtcbuf, b'\033P1$rm\033\\')
|
||||||
for sgr in '0;34;102;1;2;3;4 0;38:5:200;58:2:10:11:12'.split():
|
for sgr in '0;34;102;1;2;3;4 0;38:5:200;58:2:10:11:12'.split():
|
||||||
expected = set(sgr.split(';')) - {'0'}
|
expected = set(sgr.split(';'))
|
||||||
c.clear()
|
c.clear()
|
||||||
parse_bytes(s, f'\033[{sgr}m\033P$qm\033\\'.encode('ascii'))
|
parse_bytes(s, f'\033[{sgr}m\033P$qm\033\\'.encode('ascii'))
|
||||||
r = c.wtcbuf.decode('ascii').partition('r')[2].partition('m')[0]
|
r = c.wtcbuf.decode('ascii').partition('r')[2].partition('m')[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user