If default-terminal is set to "screen" or "screen-*", emulate screen's

historical (incorrect) behaviour for SGR 3 and send smso
(standout). Previously, we would send sitm (italics) if the terminal
outside had it and smso otherwise. This was acceptably until recently
because xterm's terminfo entry lacked sitm, so most users got smso.

People who want italics should set default-terminal to the forthcoming
"tmux" entry (and be prepared to deal with it being missing on older
hosts).

As a side-effect this changes default-terminal to be a server rather
than a session option.

suggested by and ok naddy
This commit is contained in:
nicm
2015-04-29 15:59:08 +00:00
parent e36fab2f70
commit 7382ba82c5
4 changed files with 37 additions and 24 deletions

View File

@ -61,6 +61,11 @@ const struct options_table_entry server_options_table[] = {
.default_num = 20
},
{ .name = "default-terminal",
.type = OPTIONS_TABLE_STRING,
.default_str = "screen"
},
{ .name = "escape-time",
.type = OPTIONS_TABLE_NUMBER,
.minimum = 0,
@ -143,11 +148,6 @@ const struct options_table_entry session_options_table[] = {
.default_str = _PATH_BSHELL
},
{ .name = "default-terminal",
.type = OPTIONS_TABLE_STRING,
.default_str = "screen"
},
{ .name = "destroy-unattached",
.type = OPTIONS_TABLE_FLAG,
.default_num = 0