[Top][All Lists]

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

[Nano-devel] the motions of the cursor

From: Benno Schulenberg
Subject: [Nano-devel] the motions of the cursor
Date: Thu, 18 Feb 2016 17:55:25 +0100

Hi all,

Currently, when you've made several edits all over a file
and you decide to undo them all (in order to start over or
just to see what you've done), after each undone thing,
the cursor will be either at the top or the bottom of the
edit window.  I think this is wrong: the position of the
cursor is too unpredictable.

To see what I mean, you can do 'src/nano +44 NEWS', and
type: xx M-G 888 <Enter> xx M-\.  Now type M-U and see
how the cursor is on the bottom line; then type M-U again
and see how the cursor is now on the top line.  Now imagine
doing this for a dozen or more edits...

So, I think that when the thing that is undone was offscreen
when M-U was typed, then it should center the cursor after
the undo.  That is the same behavior as for searching and
replacing: when the found match is currently offscreen,
center it.

Attached patch does this.  Comments?  Objections?

Something else, but related.  SVN revision 5171 changed
the way the screen is scrolled when some lines of text
are pasted while the cursor is near the bottom of the
screen: the screen just scrolls the required amount to
keep the cursor on the screen instead of centering the
cursor whenever the paste has moved it offscreen.  I feel
this makes for a smoother experience.  When just a few
lines are pasted, that is.

However, when a large piece of text is pasted (one that
is longer than the screen), I now find it annoying that
the cursor sits on the bottom line after such a paste --
nothing on the screen is the same any more, except for
(part of) the bottom line.  In this situation (the paste
makes what was left of the cursor move offscreen), I think
the cursor should be centered.

What do you think?

(No patch for that yet.)


-- - IMAP accessible web-mail

Attachment: focus-the-undos.patch
Description: Text Data

reply via email to

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