nano-devel
[Top][All Lists]
Advanced

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

Re: having a scroll bar also in softwrap mode


From: Marco Diego Aurélio Mesquita
Subject: Re: having a scroll bar also in softwrap mode
Date: Wed, 29 Apr 2020 22:51:02 -0300

On Wed, Apr 29, 2020 at 7:34 AM Benno Schulenberg <address@hidden> wrote:
>
>
> Op 29-04-2020 om 03:54 schreef Marco Diego Aurélio Mesquita:
> > This is probably caused because the renumbering is only triggered when
> > there is a change on a softwrapped line. What really is needed is a
> > way to detect if the number of softwrapped lines has (chunks) has
> > changed.
>
> That detection is already there: see in inject() and do_deletion().
>
> (First do a git pull and a rebase.)
>

Attached is an updated patch. It behaves correctly on my quick tests.

The for(int i = x; i < COLS - 1; i++) wprintw(edit, " "); is a hack.
For some unknown reason, wclrtoeol(edit) erases every thing to the end
of line (include scrollbar) even if mvwaddch(edit, row, COLS - 1,
bardata[row]); is performed later.

I modified draw_scrollbar function since the divisions were giving
some wrong results (probably because of rounding errors). If you want
to reproduce this problem, just press enter until a single line is
scrolled; then press up until the scrollbar rolls up: it will be
filled instead of having a free lowest slot.

Every thing seems right. Please review it.

Attachment: 0001-Initial-softwrap-support-for-scrollbar.patch
Description: Text Data


reply via email to

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