csi: add xtsave()

This function stores the current state of DECSET private modes.
This commit is contained in:
Daniel Eklöf 2020-08-16 16:38:57 +02:00
parent 0787080023
commit 5593868471
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 58 additions and 6 deletions

View file

@ -228,6 +228,7 @@ struct terminal {
tll(struct ptmx_buffer) ptmx_buffer;
enum cursor_origin origin;
enum cursor_keys cursor_keys_mode;
enum keypad_keys keypad_keys_mode;
bool reverse;
@ -240,6 +241,32 @@ struct terminal {
enum mouse_tracking mouse_tracking;
enum mouse_reporting mouse_reporting;
struct {
bool esc_prefix;
bool eight_bit;
} meta;
/* Saved DECSET modes */
struct {
enum cursor_origin origin;
enum cursor_keys cursor_keys_mode;
//enum keypad_keys keypad_keys_mode;
bool reverse;
bool hide_cursor;
bool auto_margin;
bool insert_mode;
bool bracketed_paste;
bool focus_events;
bool alt_scrolling;
enum mouse_tracking mouse_tracking;
enum mouse_reporting mouse_reporting;
struct {
bool esc_prefix;
bool eight_bit;
} meta;
bool alt_screen;
} xtsave;
struct charsets charsets;
struct charsets saved_charsets; /* For save/restore cursor + attributes */
@ -288,7 +315,6 @@ struct terminal {
uint32_t default_table[256];
} colors;
enum cursor_origin origin;
enum cursor_style default_cursor_style;
enum cursor_style cursor_style;
struct {
@ -328,11 +354,6 @@ struct terminal {
size_t match_len;
} search;
struct {
bool esc_prefix;
bool eight_bit;
} meta;
tll(int) tab_stops;
struct wayland *wl;