On Sat, Oct 24, 2009 at 10:11:30PM +0100, Nicholas Marriott wrote: > On Sat, Oct 24, 2009 at 03:54:57PM -0400, Thomas Dickey wrote: > > Since aixterm 16-colors are part of the default configuration settings, > > it's reasonable to count on the controls being present. > > I can't count on them being present because tmux may be detached from a > terminal which supports them and reattached to a terminal which does not, so > unless I can establish for sure from terminfo that they are I have to assume > they are not supported and convert them to bold+setaf/setab 0-7.
well... if you're using terminfo to tell the number of colors (256 for example), it's a reasonably safe assumption that xterm supports both the aixterm (16-color) and 256-color controls. Unless of course the $TERM is set incorrectly, in which case the 256-colors is suspect. For other terminals, the 16-color feature was used - which accounts for the 16color variants. > With latest terminfo I could say that any terminal with colors=256 has a > setaf/setab that correctly accepts all 256 colours, then use setaf/setab > instead of sending \\033[38;5;c directly to get the benefit of any > optimisations in terminfo, but that isn't a safe assumption with an older > terminfo.src :-/. I'm not sure why - from what I'm reading the only problem was that tmux didn't recognize the aixterm codes. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
pgp6d5taVKtCG.pgp
Description: PGP signature