nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] RFC: change the behavior of the two scrolling commands


From: Benno Schulenberg
Subject: Re: [Nano-devel] RFC: change the behavior of the two scrolling commands (M-- and M-=)?
Date: Mon, 12 Mar 2018 21:15:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Op 11-03-18 om 23:41 schreef Brand Huntsman:
> I have only used ^L when a bug report tells me to use it and when nano had the
> A_BANDAID syntax highlighting issues. I don't know how many people might use
> it regularly to fix terminal issues,

Exceedingly few, I guess.  Repurposing ^L for centering by default
would inconvenience just those few.

> The only problem is the total_refresh() that flickers the screen and messes
> up my eyes for several seconds. It is worse with default titlebar color but
> is still quite noticeable with my dark gray titlebar.

What terminal do you use?  I can only get the screen to flicker when
on a Linux console.  On an Xfce terminal, I can sometimes see a slight
flicker on the bottom rows when I hold down ^L for a while.

> Why does total_refresh() cause the edit window text to flicker but 
> edit_refresh() doesn't?

A total_refresh() kind of "restarts" ncurses -- the whole screen gets
set up afresh.

> A "set totalrefreshoncenter" could exist for anyone who wants to bind it to ^L
> and not rebind total_refresh to another key.

No no, no extra options, and certainly not such complicated ones.
The refresh function would become unbound by default, but available
to be rebound by the user who wants it.

> The center/top/bottom option is also nice.

It sounds nice, but I've had the patch applied locally for a long time,
and found that I never used it.  I ever only wanted to scroll the text
up or down a bit, nothing more.

>> At my uni they had an editor that worked like that: the cursor was always
>> on the center line of the screen.  It worked.  [...]
> 
> Was it annoying to have the text scroll every time you pressed enter?

Don't know, don't remember.  It was a long time ago.  The program ran on
an Exidy -- https://en.wikipedia.org/wiki/Exidy_Sorcerer.

> My biggest problem is doing all the work and finding out it is annoying to 
> use.

Then please hold off, because changing the behavior of M-- and M-= will
be followed by lots of changes.

> But it would basically rebind the up/down arrow keys to do_scroll_up/down. And
> that would be useful for reading files and a command line option to enable it
> with view mode would be nice.

Hmmm...  Now I understand why scroll_up() and scroll_down() work the way
they do: it would allow the cursor keys to work in a different way (when
it were possible to rebind the cursor keys).  Hrm...  When changing the
behavior of M-- and M-=, the current scroll_up/down behavior will disappear.

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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