nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] RFC: line numbers?


From: Faissal Bensefia
Subject: Re: [Nano-devel] RFC: line numbers?
Date: Thu, 20 Oct 2016 12:58:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0


On 20/10/16 11:09, Benno Schulenberg wrote:
> 
> On Thu, Oct 20, 2016, at 11:41, Faissal Bensefia wrote:
>> On 19/10/16 20:00, Benno Schulenberg wrote:
>>>     new feature: the ability to show line numbers before the text
>>>     
>>>     It can be activated with --linenumbers on the command line or with
>>>     'set linenumbers' in a nanorc file, and it can be toggled with M-#.
>>
>> Yeah, I've used that one for this patch (I did change the capitalisation
>> though).
> 
> The lack of capitals in the first line is the proper style.
> 
>> On 19/10/16 20:40, Chris Allegretta wrote:
>>> Apologies, not been in the loop until now, but I think it makes sense
>>> to optimize the layout for at least 99/999 lines by default.
>>
>> Done, I've made it so that it doesn't change between 9 and 10 lines but
>> I've left it still changing between 99 to 100 lines
> 
> +     if (digits(openfile->filebot->lineno) + 1 != margin
> +         || digits(openfile->filebot->lineno) != 2) {
> +         margin = digits(openfile->filebot->lineno) >2 ?
> +             digits(openfile->filebot->lineno) + 1 : 3;
> 
> That can be done much simpler by tweaking digits() itself.
> See attached patch.
> 
>>> The second patch adds an option to change the color of the
>>> line numbers.
>>
>> I've incorporated this in the patch.
> 
> No, you shouldn't.  Keep it separate -- it is my work,
> not yours.  It was just to show what will follow after
> your patch.
> 
> Benno
> 

Is there anything I need to do with the patch you sent or is that it?

~Faissal Bensefia



reply via email to

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