summaryrefslogtreecommitdiffstats
path: root/tty-term.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-10-25 21:11:21 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-10-25 21:11:21 +0000
commit3a7636ff0f3eed214a847edbfb3bd8007128d49a (patch)
tree3ccaae348cdce4f85a1b71b6cd34c71b53ff100c /tty-term.c
parent5bed597e619e4b749c68273d45441406cbab16a9 (diff)
Remove the -d flag to tmux and just use op/AX to detect default colours.
Irritatingly, although op can be used to tell if a terminal supports default colours, it can't be used to set them because in some terminfo descriptions it resets attributes as a side-effect (acts as sgr0) and in others it doesn't, so it is not possible to determine reliably what the terminal state will be afterwards. So if AX is missing and op is present, tmux just sends sgr0. Anyone using -d for a terminal who finds they actually needed it can replace it using terminal-overrides, but please let me know as it is probably an omission from terminfo.
Diffstat (limited to 'tty-term.c')
-rw-r--r--tty-term.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/tty-term.c b/tty-term.c
index 7add7cab..8a592b31 100644
--- a/tty-term.c
+++ b/tty-term.c
@@ -348,17 +348,6 @@ tty_term_find(char *name, int fd, const char *overrides, char **cause)
goto error;
}
- /*
- * Figure out if terminal support default colours. AX is a screen
- * extension which indicates this. Also check if op (orig_pair) uses
- * the default colours - if it does, this is a good indication the
- * terminal supports them.
- */
- if (tty_term_flag(term, TTYC_AX))
- term->flags |= TERM_HASDEFAULTS;
- if (strcmp(tty_term_string(term, TTYC_OP), "\033[39;49m") == 0)
- term->flags |= TERM_HASDEFAULTS;
-
/* Figure out if we have 256 or 88 colours. */
if (tty_term_number(term, TTYC_COLORS) == 256)
term->flags |= TERM_256COLOURS;