nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] Port of variable-length chunks to 2.8.2


From: David Ramsey
Subject: Re: [Nano-devel] Port of variable-length chunks to 2.8.2
Date: Wed, 10 May 2017 19:57:59 -0500

On Wed, May 10, 2017 at 5:15 PM, David Ramsey <address@hidden> wrote:
>> 0005:
>>
>> +       if (openfile->placewewant >= realspan)
>> +           *target_column %= editwincols;
>>
>> placewewant /cannot/ be larger than realspan -- see the code six
>> lines earlier.  And if it's equal, does target_column still need
>> to be moduloed?  I've removed those two lines and haven't seen
>> errant behavior.
>
> Yes it /can/; the COLUMN portion of the +LINE,COLUMN option can specify
> a placewewant past the length of the line (realspan), and a bug caused
> by that is the reason you added the code for realspan in commit 244a503.
> And such a placewewant also shows up as part of bug
> #50995.  This code is to handle cases like that.

That came out harsher than I intended, and I'm not sure I was clear
enough.  Let me be clearer: if placewewant is greater than realspan, as
it can be if +LINE,+COLUMN is used to put the cursor past the end of a
line, target_column needs to be moduloed in order to keep it at the same
vertical position before it's added to the leftedge, which we need to do
if moving up or down.

It seems that +LINE,+COLUMN setting placewewant leads to a lot of corner
cases.  Maybe that should change instead?



reply via email to

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