nano-devel
[Top][All Lists]
Advanced

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

Re: a scroll bar on the right that shows position and portion


From: Brand Huntsman
Subject: Re: a scroll bar on the right that shows position and portion
Date: Sat, 25 Apr 2020 05:39:15 -0600
User-agent: -

On 12:54 Fri 24-Apr-2020, Benno Schulenberg wrote:
> > +   /* If the terminal is too thin, don't set up a scrollbar. */
> > +   if (COLS < 3)
> > +           scrollbarwin = NULL;
>
> Again, wrong place for this snippet.

That code doesn't even work. The LINES<3 branch should set scrollbarwin
to null and the other branch must check for COLS>=3 before doing newwin,
otherwise set scrollbarwin to null.


I applied all of Benno's suggestions to your patch and attached it. The
second patch fixes the scrollbar for short buffers and also when
scrolled beyond the end of a buffer. It hides the knob when entire
buffer is visible and reserves the space on either end of scrollbar for
a '+' when lines above or below the edit window aren't visible. This
fixes the issue in NEWS when you scroll the top or bottom line off
screen and the scrollbar shows the knob at top or bottom of bar, giving
no indication of more lines. It also erases the scrollbar window before
deleting it in window_init(), otherwise resizing the terminal window, so
edit window is less than 3 lines, would leave the old scrollbar on
screen.

I didn't fix the help or browser menu issues. There is also an issue
when opening NEWS in a terminal that doesn't support utf-8. The utf-8
characters take up multiple spaces and cause the lines to overlap
scrollbar.

Attachment: 0001-scrollbar.patch
Description: Text Data

Attachment: 0002-fix-scrollbar.patch
Description: Text Data


reply via email to

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