From d1938cb0606697679432d145c7c0544c768d3e0d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 8 Apr 2025 13:07:59 +0530 Subject: [PATCH] Fix failing test --- kitty/screen.c | 2 +- kitty_tests/parser.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/screen.c b/kitty/screen.c index 8cfc818bd..711971bb8 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -2996,7 +2996,7 @@ screen_request_capabilities(Screen *self, char c, const char *query) { // SGR const char *s = cursor_as_sgr(self->cursor); 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 shape = snprintf(buf, sizeof(buf), "1$r%u;%ur", self->margin_top + 1, self->margin_bottom + 1); } else if (strcmp("*x", query) == 0) { // DECSACE diff --git a/kitty_tests/parser.py b/kitty_tests/parser.py index dd0f1301a..f6c395786 100644 --- a/kitty_tests/parser.py +++ b/kitty_tests/parser.py @@ -536,7 +536,7 @@ class TestParser(BaseTest): pb('\033P$qm\033\\', ('screen_request_capabilities', ord('$'), 'm')) 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(): - expected = set(sgr.split(';')) - {'0'} + expected = set(sgr.split(';')) c.clear() parse_bytes(s, f'\033[{sgr}m\033P$qm\033\\'.encode('ascii')) r = c.wtcbuf.decode('ascii').partition('r')[2].partition('m')[0]