tty: Add option to forward unrequested escape sequence

Adds an option "forward-unrequested-escseq" for tmux to forward
unrequested escape sequences to the client. For example, when an OSC 52
escape sequence is received outside a designated TTY_OSC52QUERY context,
it will be passed on to the client application if the option is on,
otherwise it's discarded.
This commit is contained in:
holio0
2024-10-17 10:34:45 +08:00
parent 46f3846659
commit 8ca212579a
3 changed files with 17 additions and 2 deletions

View File

@@ -448,6 +448,14 @@ const struct options_table_entry options_table[] = {
"'User0', 'User1' and so on."
},
{ .name = "forward-unrequested-escseq",
.type = OPTIONS_TABLE_FLAG,
.scope = OPTIONS_TABLE_SERVER,
.default_num = 0,
.text = "Whether unrequested escape sequences are forwarded to "
"clients. Can be 'off' (disallowed) or 'on' (allowed)."
},
/* Session options. */
{ .name = "activity-action",
.type = OPTIONS_TABLE_CHOICE,