mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 06:25:13 +02:00
Bring implementation of XTSAVE and XTRESTORE into line with xterm
Now a stack of depth 1 is used to save/restore private mode values. And saving/restoring individual modes is supported. This latter is used by midnight commander.
This commit is contained in:
@@ -92,10 +92,18 @@ def screen_set_mode(x: int, private: bool) -> None:
|
||||
write(CSI + ('?' if private else '') + str(x) + 'h')
|
||||
|
||||
|
||||
def screen_save_mode(x: int, private: bool) -> None:
|
||||
write(CSI + ('?' if private else '') + str(x) + 's')
|
||||
|
||||
|
||||
def screen_reset_mode(x: int, private: bool) -> None:
|
||||
write(CSI + ('?' if private else '') + str(x) + 'l')
|
||||
|
||||
|
||||
def screen_restore_mode(x: int, private: bool) -> None:
|
||||
write(CSI + ('?' if private else '') + str(x) + 'r')
|
||||
|
||||
|
||||
def screen_set_margins(t: int, b: int) -> None:
|
||||
write(CSI + '%d;%dr' % (t, b))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user