nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] small addition: understand color name "normal"


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] small addition: understand color name "normal" to mean the default color
Date: Fri, 30 Mar 2018 11:00:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

Op 29-03-18 om 11:23 schreef Brand Huntsman:
> On Tue, 27 Mar 2018 13:55:38 +0200
> Benno Schulenberg <address@hidden> wrote:
>> +    if (*bg == -2)
>> +            *bg = -1;
> 
> Why is this conditional at the bottom where it will always execute instead of 
> immediately after the call to color_to_short that sets bg to -2?

Yes, that was a silly place to put it.  Thanks for reporting.

But... there is something strange.  When the background color is invalid
(say, "onion"), it falls back to the default color, but when this name is
prefixed with "bright" ("brightonion"), the whole command gets rejected.

I think it should handle both cases the same.  I think it makes the most
sense to reject a color command whenever something is wrong with it.  So
I have pushed a change that does that: commit cbf22647.

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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