[Top][All Lists]

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

[Nano-devel] problems when chunks are of variable length

From: Benno Schulenberg
Subject: [Nano-devel] problems when chunks are of variable length
Date: Thu, 30 Mar 2017 12:06:33 +0200

On Thu, Mar 30, 2017, at 03:17, David Ramsey wrote:
> With this patch set, when moving vertically, placewewant has to be kept
> relative to the current leftedge, because when lines can be broken at
> arbitrary locations, there's no way to know where, say, column 200 is;
> on one line, column 200 in the line could be column 60 onscreen, while
> in another, it could be column 50 onscreen.  However, if the starting
> column is set past the end of the line (covered starting with git commit
> 244a503), that's where the problem is: if chunks are of variable length,
> and the starting column you want is unavailable, there's no way to
> determine what it should be.

If with "starting column" you mean leftedge, I don't see what you
mean, since any chunk will have a leftedge.

Ah, no.  With "starting column" you mean "the column we ideally would
be on before the movement is made".  Well, when chunks are of variable
length, and if placewewant is beyond the actual span of the current line,
nano should assume that the virtual chunks that would be needed to make
the current line reach beyond placewewant are each of size editwincols.
In other words, in that case target_column is not placewewant - leftdege,
but (placewewant - leftedge) % editwincols.

If it's not clear what I mean, please give a specific example.


-- - The professional email service

reply via email to

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