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: Benno Schulenberg
Subject: Re: [Nano-devel] Port of variable-length chunks to 2.8.2
Date: Fri, 05 May 2017 21:33:23 +0200

On Thu, May 4, 2017, at 14:04, David Ramsey wrote:
> Attached.  This fixes one bug in the last version: if a line was
> softwrapped early, and the mark was on, the ">" would erroneously be
> drawn to the right of the cursor instead of at the softwrap breakpoint.

I will look at the patch set next week.

But first something that has bothered me for at least two months.
Whenever update_line() is called in softwrap mode, the subsequent
call to update_softwrapped_line() figures out /every time/ on which
row to start drawing this line, involving a strlenpt() call on each
visible preceding line.  When we have a file consisting of ten long
lines that each take up two screen rows, then, when doing a full
screen refresh, before drawing the second line, a strlenpt() call is
done on the first line; before drawing the third line, a call on the
first and the second line; before drawing the fourth line, a call on
the first and the second and the third line...  This is wasteful.  It
would be nice to optimize this, to add an extra parameter that tells
update_line() on which row to draw, because when edit_refresh() makes
these calls, it already knows on which row the line should start.
For all other calls of update_line(), when this extra parameter is
zero, it could mean that update_line() should figure out itself on
which row to start.

Benno

-- 
http://www.fastmail.com - Send your email first class




reply via email to

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