nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] Nano with Line Numbering


From: Faissal Bensefia
Subject: Re: [Nano-devel] Nano with Line Numbering
Date: Tue, 20 Sep 2016 12:38:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0


On 20/09/16 11:23, Benno Schulenberg wrote:
> 
> On Mon, Sep 19, 2016, at 16:43, Faissal Bensefia wrote:
>> On 18/09/16 19:09, Benno Schulenberg wrote:
>> I have attached the new patch.
> 
> Okay.  Now try this:
>   stty cols 44 && src/nano --ignore --soft --linenum +4 README.GIT
> 
> Notice how line 4 is wrapped over three lines, but the third line
> is empty.  Now press <Down>.  One expects the cursor to go to the
> start of line 5, but instead it goes to the empty tail of line 4.
> Not good.  Now press <Right> <Right>...  The cursor moves as if
> there is a very long invisible tail on line 4.  Now press W.  The
> character appears in line 5, but the cursor stays on the line above
> it.  Also notice how line 5 seems to be broken into two lines and
> all the lines after it were renumbered.  But that is all just in
> appearance -- things are messed up and the cursor is never shown
> where it really is.
> 
>> Sorry about being too terse, I hope this is a bit better.
> 
> Yes, much better.  Thanks.
> 
> Benno
> 
I have fixed the issue you mentioned, the issue came from this
-           openfile->current_y += strlenpt(line->data) / (COLS - margin + 1) + 
1;
+           openfile->current_y += strlenpt(line->data) / (COLS - margin) + 1;

This was a mistake in adapting it to use margin. The new patch is attached.

~Faissal Bensefia

Attachment: 0001-Added-line-numbers.patch
Description: Text Data


reply via email to

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