[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] a scroll bar on the right that shows position and portion
From: |
Benno Schulenberg |
Subject: |
Re: [RFC] a scroll bar on the right that shows position and portion |
Date: |
Thu, 23 Apr 2020 10:43:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
Op 23-04-2020 om 05:10 schreef Marco Diego Aurélio Mesquita:
> Having vertical scrollbar in gnu nano is cool
Yes. But it should be behind an option. It is annoying to have that
moving thing on the right when you are not used to it, so some people
will want to do without it.
Also, the patch doesn't properly display things when lines are longer
than the screen width. Run for example src/nano +191 doc/faq.html --
all the continuation characters (>) are overwritten.
> + int screen_lines = LINES - 2 - (ISSET(NO_HELP) ? 0 : 2);
It should not be necessary to compute this. Use 'editwinrows'.
> + int scroll_len = (screen_lines*screen_lines)/(last_lineno+1);
This variable is used only once; there is no need for it.
> + mvwaddch(edit, current_lineno, COLS - 1, '*');
Why the star? Have a look at the scrollbar of fte. Showing a
background color for the non-active part is much nicer in my eyes.
> update_line(openfile->current, openfile->current_x);
> + draw_scrollbars();
Is this call needed? If yes, which case does it cover?
And of course the name of the function should be singular: it draws
just one bar.
Benno
signature.asc
Description: OpenPGP digital signature