mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 16:05:02 +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:
@@ -11,7 +11,6 @@
|
||||
import sys
|
||||
from contextlib import suppress
|
||||
from typing import Any
|
||||
from functools import partial
|
||||
|
||||
|
||||
CSI = '\033['
|
||||
@@ -109,6 +108,18 @@ def screen_delete_characters(count: int) -> None:
|
||||
write(CSI + '%dP' % count)
|
||||
|
||||
|
||||
def screen_push_colors(which: int) -> None:
|
||||
write(CSI + '%d#P' % which)
|
||||
|
||||
|
||||
def screen_pop_colors(which: int) -> None:
|
||||
write(CSI + '%d#Q' % which)
|
||||
|
||||
|
||||
def screen_report_colors() -> None:
|
||||
write(CSI + '#R')
|
||||
|
||||
|
||||
def screen_insert_characters(count: int) -> None:
|
||||
write(CSI + '%d@' % count)
|
||||
|
||||
@@ -193,8 +204,6 @@ def write_osc(code: int, string: str = '') -> None:
|
||||
|
||||
|
||||
set_dynamic_color = set_color_table_color = write_osc
|
||||
screen_push_dynamic_colors = partial(write_osc, 30001)
|
||||
screen_pop_dynamic_colors = partial(write_osc, 30101)
|
||||
|
||||
|
||||
def replay(raw: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user