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: Mon, 10 Oct 2016 20:54:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0


On 10/10/16 12:37, Benno Schulenberg wrote:
> 
> On Sun, Oct 9, 2016, at 18:54, Faissal Bensefia wrote:
>> On 09/10/16 16:58, Benno Schulenberg wrote:
>>> Second, it doesn't fix the issue.  When running 'stty rows 20 &&
>>> stty cols 70 && src/nano --ignore --softwrap +999 README --line'
>>> the cursor is still after "hand" instead of on the final line.
>>
>> Ah I see, sorry I misread what you said. This diff should fix it, it was
>> an issue with scrolling not taking into account the margin.
> 
> It still doesn't fix the issue.  Do you test with the given command
> at all?
Yes and I'm pretty sure it fixed the issue you were describing, I even
tested it with the old version of nano I that came with my installation
and it worked the same after that change.
> 
> The problem, though, is not in your patch but in do_gotolinecolumn(),
> which does not take softwrap into account when trying to figure out
> whether the target line is near the bottom of the file.  I've pushed
> a change that will avoid the issue.
> 
> However, your patch is lacking several more "COLS - margin" changes.
> See attached diff.  I don't know if all of them are needed, and if
> there are not others that need to be changed.  Probably it will be
> cheaper to compute a COLS - margin up front and use that everywhere
> instead of repeating the computation many times.
> 
> Benno
> 
Maybe, but we'd have to anticipate every time either margin or COLS
changed. Really, it's a nitpick that can be dealt with in future after
it's pushed. I've attached a new diff with your changes, both from the
upstream repo and from your diff, integrated.
~Faissal Bensefia

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


reply via email to

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