mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-07 17:43:53 +02:00
Stop setting title to ";" when 0-length OSC 2 is received
Various programs send a 0-length title if no title is configured (e.g., (n)vim with 'title' unset, or mutt without ts_enabled). When this happens, kitty is mis-parsing the data and setting the title to ";".
This commit is contained in:
@@ -310,7 +310,7 @@ dispatch_osc(Screen *screen, PyObject DUMP_UNUSED *dump_callback) {
|
||||
}
|
||||
if (i > 0) {
|
||||
code = utoi(screen->parser_buf, i);
|
||||
if (i < limit - 1 && screen->parser_buf[i] == ';') i++;
|
||||
if (i < limit && screen->parser_buf[i] == ';') i++;
|
||||
}
|
||||
PyObject *string = PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, screen->parser_buf + i, limit - i);
|
||||
if (string != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user