Sync OpenBSD patchset 446:

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.
This commit is contained in:
Tiago Cunha
2009-10-28 22:48:35 +00:00
parent c4637da860
commit 41863470ba
5 changed files with 32 additions and 41 deletions

10
tmux.h
View File

@ -1,4 +1,4 @@
/* $Id: tmux.h,v 1.484 2009-10-23 17:49:47 tcunha Exp $ */
/* $Id: tmux.h,v 1.485 2009-10-28 22:48:35 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -344,7 +344,6 @@ struct msg_identify_data {
#define IDENTIFY_UTF8 0x1
#define IDENTIFY_256COLOURS 0x2
#define IDENTIFY_88COLOURS 0x4
#define IDENTIFY_HASDEFAULTS 0x8
int flags;
};
@ -906,10 +905,9 @@ struct tty_term {
struct tty_code codes[NTTYCODE];
#define TERM_HASDEFAULTS 0x1
#define TERM_256COLOURS 0x2
#define TERM_88COLOURS 0x4
#define TERM_EARLYWRAP 0x8
#define TERM_256COLOURS 0x1
#define TERM_88COLOURS 0x2
#define TERM_EARLYWRAP 0x4
int flags;
SLIST_ENTRY(tty_term) entry;