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: Brand Huntsman
Subject: Re: [Nano-devel] RFC: change the behavior of the two scrolling commands (M-- and M-=)?
Date: Sat, 10 Mar 2018 16:30:57 -0700

On Sat, 10 Mar 2018 17:15:06 +0100
Benno Schulenberg <address@hidden> wrote:

> Op 10-03-18 om 11:39 schreef Benno Schulenberg:
> > What would have been better is when Scroll-Up/Down would have kept
> > the cursor not in the same screen position but in the same *text*
> > position, because that is what I normally want.  (And that is what
> > Emacs does.  Not that Emacs is sacrosanct, but generally it has
> > well thought-out behavior.)  
> What's more, Vim behaves the same way (^E/^Y): you can scroll a file
> that fully fits on screen (and you cannot scroll up beyond the first
> line). *And* it will keep the cursor in the same text position when
> possible.
> 
> So, I propose that nano be changed to do the same thing: keep the
> cursor at the same place in the text instead of at the same place on
> the screen. See the upcoming patch.  (Documentation changes not yet
> included.)
> 
> Any objections, comments, hoorays?

This exact feature (V2 patch) was on my todo list. After reaching bottom of 
page I scroll view and must then move cursor back up to previous position in 
text, this does that all in one step. I was going to add two new functions on 
M-_ and M-+ to avoid breaking the old behavior. But I would have swapped the 
bindings on my system and probably never use the old behavior, so I have no 
objection to removing the old behavior.

I also wanted to add a key that scrolls cursor to center of window. You have to 
scroll 40 lines with M-= to go from bottom to center in an 80 tall window.

And/or a toggle mode that keeps cursor from changing lines in the window. You 
press enter or down arrow and the text scrolls to keep cursor on same line in 
window. This would be better than a key to center the view because it always 
keeps the view centered on any line you choose, which doesn't need to be the 
middle of the window. I haven't written a patch yet to see if it would be 
annoying, but it sounds good in theory.




reply via email to

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