Hi

Sorry for the delay.

On Sat, Feb 11, 2012 at 01:51:15PM -0500, Peter Lustig wrote:
> On 2/9/2012 4:00 AM, Nicholas Marriott wrote:
> >I'd rather not translate aixterm colours on terminals that support them:
> >
> >- They are fewer bytes than the 256 colour equivalents.
> >
> >- We can't predict what configuration options terminals have - some may
> >   have the ability to alter the palette for aixterm colours independent
> >   of the 256 colour palette.
> >
> >I'd rather they were passed through unaltered except on 8 colour
> >terminals.
> 
> I see your reasoning with the second point:  tmux should make as few
> assumptions as possible regarding the underlying terminal.  But, if
> you decide to accept my (original) patch, wouldn't tmux then be
> making the implicit assumption that all 256-colour terminals use the
> same palette as xterm-256 (and all 88-colour terminals the same as
> xterm-88)?  For example, that the indices 8-15 correspond to the
> aixterm colours?  (Actually, this assumption is still there in the
> current version of tmux; all the patch does is remove another
> assumption regarding the actual _format_ of the 256/88-colour escape
> sequences.)

At the moment tmux assumes that 256 colours are set using
\033[38;5;Xm. This is definitely not ideal.

However it is definitely fine to assume that the 256 colour palette is
fixed.

But I'm not sure it's fine to assume the aixterm colours are fixed or
that they are the same as colours 8-15. And definitely not ok to assume
the standard ANSI colours are the same as colours 0-7 in the 256 colour
palette.

Of course you're right it's not ideal to assume that aixterm sequence is
\033[9Xm either.

Dunno, might be best to just map everything to setaf and assume it'll do
the right thing with colours 0-15.

> 
> That being said, perhaps the better way of resolving the issue would
> be for tmux to have its own termcap/terminfo entries (I see from the
> TODO file that you have been considering this).  As it stands right
> now, tmux assumes that all 256/88/16-colour terminals support
> aixterm colours.  At least one 256-colour terminal (i.e. fbterm)
> does not.  This wouldn't be an issue if not for the fact that
> 256-colour tmux relies on the 'screen-256color' termcap/terminfo
> entry, which yields ANSI colours for indices 0-7, aixterm colours
> for indices 8-15, and xterm-256 colours for indices 16-255 (for the
> sake of saving characters).  Were tmux to have its own 256-colour
> termcap/terminfo entry it would seem best to use the same set of
> escape sequences (i.e. xterm-256) for all colours (or at least for
> non-ANSI colours).  Then applications running in tmux and relying on
> termcap/terminfo would not be coerced into using aixterm colours,
> but the aixterm colours would be still be available for explicit
> use.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to