Remove parse error forsystemd's useless OSC 3008 context protocol

It's spamming the test logs. Just ignore it silently
This commit is contained in:
Kovid Goyal 2025-11-11 09:42:42 +05:30
parent 456fa8691a
commit 1faf786bd2
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
4 changed files with 13 additions and 1 deletions

View file

@ -3009,6 +3009,11 @@ set_title(Screen *self, PyObject *title) {
CALLBACK("title_changed", "O", title);
}
void
osc_context(Screen *self, PyObject *ctx) {
CALLBACK("osc_context", "O", ctx);
}
void
desktop_notify(Screen *self, unsigned int osc_code, PyObject *data) {
CALLBACK("desktop_notify", "IO", osc_code, data);

View file

@ -248,6 +248,7 @@ void screen_pop_colors(Screen *, unsigned int);
void screen_report_color_stack(Screen *);
void screen_handle_kitty_dcs(Screen *, const char *callback_name, PyObject *cmd);
void set_title(Screen *self, PyObject*);
void osc_context(Screen *self, PyObject *ctx);
void desktop_notify(Screen *self, unsigned int, PyObject*);
void set_icon(Screen *self, PyObject*);
void set_dynamic_color(Screen *self, unsigned int code, PyObject*);

View file

@ -602,7 +602,10 @@ dispatch_osc(PS *self, uint8_t *buf, size_t limit, bool is_extended_osc) {
case 666: REPORT_ERROR("Ignoring OSC 666, typically used by VTE terminals for shell integration"); break;
case 697: REPORT_ERROR("Ignoring OSC 697, typically used by Fig for shell integration"); break;
case 701: REPORT_ERROR("Ignoring OSC 701, used by mintty for locale"); break;
case 3008: REPORT_ERROR("Ignoring OSC 3008, used by systemd for OSC-context"); break;
case 3008:
START_DISPATCH
DISPATCH_OSC(set_title);
END_DISPATCH
case 7704: REPORT_ERROR("Ignoring OSC 7704, used by mintty for ANSI colors"); break;
case 7750: REPORT_ERROR("Ignoring OSC 7750, used by mintty for Emoji style"); break;
case 7770: REPORT_ERROR("Ignoring OSC 7770, used by mintty for font size"); break;

View file

@ -1286,6 +1286,9 @@ def title_changed(self, new_title: memoryview | None, is_base64: bool = False) -
if self.override_title is None:
self.title_updated()
def osc_context(self, ctx_data: memoryview) -> None:
pass # this is systemd's useless OSC 3008 context protocol
def icon_changed(self, new_icon: memoryview) -> None:
pass # TODO: Implement this