mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-12 02:42:56 +02:00
Add support for the color settings stack that XTerm copied from us without acknowledgement and decided to use incompatible escape codes for.
Completely in keeping with that project's past behavior. See https://github.com/kovidgoyal/kitty/issues/879 XTerm announcement: https://www.mail-archive.com/xorg@lists.x.org/msg06419.html
This commit is contained in:
@@ -439,7 +439,8 @@ dispatch_osc(Screen *screen, PyObject DUMP_UNUSED *dump_callback) {
|
||||
case '*': \
|
||||
case '\'': \
|
||||
case ' ': \
|
||||
case '$':
|
||||
case '$': \
|
||||
case '#':
|
||||
|
||||
|
||||
static inline void
|
||||
@@ -759,7 +760,23 @@ dispatch_csi(Screen *screen, PyObject DUMP_UNUSED *dump_callback) {
|
||||
case DL:
|
||||
CALL_CSI_HANDLER1(screen_delete_lines, 1);
|
||||
case DCH:
|
||||
CALL_CSI_HANDLER1(screen_delete_characters, 1);
|
||||
if (end_modifier == '#' && !start_modifier) {
|
||||
CALL_CSI_HANDLER1(screen_push_colors, 0);
|
||||
} else {
|
||||
CALL_CSI_HANDLER1(screen_delete_characters, 1);
|
||||
}
|
||||
case 'Q':
|
||||
if (end_modifier == '#' && !start_modifier) { CALL_CSI_HANDLER1(screen_pop_colors, 0); }
|
||||
REPORT_ERROR("Unknown CSI Q sequence with start and end modifiers: '%c' '%c' and %u parameters", start_modifier, end_modifier, num_params);
|
||||
break;
|
||||
case 'R':
|
||||
if (end_modifier == '#' && !start_modifier) {
|
||||
REPORT_COMMAND(screen_report_color_stack);
|
||||
screen_report_color_stack(screen);
|
||||
break;
|
||||
}
|
||||
REPORT_ERROR("Unknown CSI R sequence with start and end modifiers: '%c' '%c' and %u parameters", start_modifier, end_modifier, num_params);
|
||||
break;
|
||||
case ECH:
|
||||
CALL_CSI_HANDLER1(screen_erase_characters, 1);
|
||||
case DA:
|
||||
|
||||
Reference in New Issue
Block a user