[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] A patch for added color support

From: Eitan Adler
Subject: Re: [Nano-devel] A patch for added color support
Date: Sun, 12 Oct 2014 03:01:30 -0700

On 12 October 2014 02:18, Benno Schulenberg <address@hidden> wrote:
> Hello Erik,
> On Sat, Oct 11, 2014, at 13:28, Erik Lundin wrote:
>> I have created a patch to add support for 256 colors in nano. What do you
>> think?
> Nice!  However, the detection whether the terminal supports 256 colours
> is in my opinion too simple.  My TERM is set by default to "xterm", so with
> your patch I don't get more than sixteen colours.  But if I simply set TERM
> to "xterm-256color", I do get the 256 colours.  So... how does one find out
> properly whether the terminal is /capable/ of more than sixteen colours?

+1.  The specific check for xterm-256color is not good, especially
where tmux or screen is used.

Based on documentation it should be possible to use tgetnum("Co") to
determine the maximum number of colors supported. I'm unsure if this
is accurate.

> About the patch itself: I don't like the use of question marks in color???
> to indicate that three decimal digits have to be filled in; I would prefer
> something like colorxxx.  Also, it is completely unclear to me how the
> xxx numbers choose a color.  This should be tersely explained in the
> man page, I think -- maybe with a link to a Wikipedia article that has
> all the details and colourful examples?

General question:  If a color is set which is beyond the capability of
the terminal, do we want to do nothing, or do we want to clamp the
color one of the available, more limited set?

> Thanks for the patch, it is a nice start.

+1.  Thanks for working on it!

Eitan Adler

reply via email to

[Prev in Thread] Current Thread [Next in Thread]