[Top][All Lists]

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

Re: [Nano-devel] a problem with tabs after the overhaul

From: Benno Schulenberg
Subject: Re: [Nano-devel] a problem with tabs after the overhaul
Date: Fri, 17 Mar 2017 20:17:50 +0100

On Fri, Mar 17, 2017, at 17:55, David Ramsey wrote:
> Unfortunately, this is another manifestation of nano's problems
> with a character at the edge of the screen taking up multiple
> columns, which is unfixable until variable-length chunk support is
> added.  [...]  (Unless you have another way to do it, [...]

I don't have another way, yet, but there must be one.

> As for why the cursor jams, it's because placewewant is
> column 72,

You mean 75, right?  Because otherwise the modulo wouldn't be zero:

> and the formula to convert placewewant into a value
> relative to the current chunk is (placewewant % editwincols), which
> ends up being zero since editwincols is 75.

But placewewant shouldn't be 75 nor 72 at all.  The last thing
we did was a vertical movement, and vertical movements should
leave the placewewant alone, shouldn't change it.  So... somehow
nano should remember in what chunk of a line it is supposed to be
even when the cursor is maybe shown in a different chunk/row.  The
actual placewewant, the intended position of the cursor, is then:
chunknumber * editwincols + placewewant % editwincols.

Just like we have an openfile-current_y, we will need an
openfile->current_chunk -- the chunk number.


-- - Faster than the air-speed velocity of an
                          unladen european swallow

reply via email to

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