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: Sun, 09 Oct 2016 16:24:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

I've attached the new diff, compute_maxrows() was miscalculating how
many lines we had, subtracting 1 from the margin seems to correct the
issue without affecting situations where the line numbers are disabled.
~Faissal Bensefia

On 09/10/16 11:21, Benno Schulenberg wrote:
> 
> On Tue, Sep 20, 2016, at 17:47, Benno Schulenberg wrote:
>> Things start to look good.  After some quick testing, I didn't find
>> any problems.  But I don't have time now to do a thorough inspection
>> and test of the patch.  It will have to wait.
> 
> I'm back from vacation, and have done some testing with
> your patch.  I found the following small problem.
> 
> Run 'stty cols 70 && stty rows 20'.  Then run
> 'src/nano --ignore --softwrap +999 README'
> and see how the cursor is properly placed at
> the end of the file.  A <Down> has no effect.
> Exit from nano and run the same command again
> but add the --linenumbers option.  See how now
> the cursor is at the end of line 72, after "hand.".
> A <Down> will move the cursor to line 73, the
> proper end of the file.
> 
> The presenece of the line numbers cause an extra line wrap
> (on line 66), which somehow is not taken into account when
> placing the cursor.
> 
> I've attached a slightly tweaked version of your patch: the
> enabling logic has been inverted (that wil be the future of
> the other options too), some superfluous parentheses were
> removed, some comments improved, and other small adjustments.
> Please use that patch as your basis to improve upon.
> 
> Benno
> 

Attachment: 0001-Add-line-numbering.patch
Description: Text Data


reply via email to

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