Ignore OSC 6

This commit is contained in:
Kovid Goyal 2022-03-14 22:04:38 +05:30
parent e33bf11012
commit 43851fc1c4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 7 additions and 4 deletions

View File

@ -411,6 +411,7 @@ dispatch_osc(Screen *screen, PyObject DUMP_UNUSED *dump_callback) {
START_DISPATCH START_DISPATCH
DISPATCH_OSC_WITH_CODE(set_color_table_color); DISPATCH_OSC_WITH_CODE(set_color_table_color);
END_DISPATCH END_DISPATCH
case 6:
case 7: case 7:
START_DISPATCH START_DISPATCH
DISPATCH_OSC_WITH_CODE(process_cwd_notification); DISPATCH_OSC_WITH_CODE(process_cwd_notification);

View File

@ -2070,10 +2070,12 @@ set_color_table_color(Screen *self, unsigned int code, PyObject *color) {
} }
void void
process_cwd_notification(Screen *self, unsigned int code UNUSED, PyObject *cwd) { process_cwd_notification(Screen *self, unsigned int code, PyObject *cwd) {
Py_CLEAR(self->last_reported_cwd); if (code == 7) {
self->last_reported_cwd = cwd; Py_CLEAR(self->last_reported_cwd);
Py_INCREF(self->last_reported_cwd); self->last_reported_cwd = cwd;
Py_INCREF(self->last_reported_cwd);
} // we ignore OSC 6 document reporting as we dont have a use for it
} }
void void