bugGNU nano - Bugs: bug #51489, when in non-smooth mode, the...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #51489: when in non-smooth mode, the behavior of <PageDown> at EOF is absurd

Submitter:  Benno Schulenberg <bens>
Submitted:  Mon 17 Jul 2017 08:53:09 AM UTC
   
 
Severity:  2 - Minor Status:  Wont Fix
Assigned to:  bens Open/Closed:  Closed

Tue 18 Jul 2017 07:40:32 PM UTC, comment #2: 

Even when just doing 'pico README' or 'nano --ignore +1 README' and typing <Down> until the cursor is on the bottom row, and then typing <PageDown>...  The cursor will effectively have moved up one line.  I had never realized this -- because I must have put 'set smooth' in my .nanorc within a week of starting to use nano.

So, this absurd behavior cannot be fixed: it is what Pico does too, and has been this way for too long.

But yes, it is better that nano behaves as closely to Pico when no options are given to modify its behavior.  Commit 255f5478 should achieve this for the +-1 case.

Marking this bug as "wontfix", because: "cantfix".

Benno Schulenberg <bens>
Group administrator
Mon 17 Jul 2017 03:35:43 PM UTC, comment #1: 

It is absurd, but if you do the equivalent in Pico (version 5.07, from Alpine 2.20), Pico acts exactly the same way:

1. Run: pico +77 README

2. Press Up to move to the "all the years" line.

3. Press Ctrl-K to cut the line.

4. Press Ctrl-U to uncut the line 10 times, so that the cursor is manually placed on the bottom line of the screen.

5. Press PageDown.  The cursor ends up on the next-to-last line of the screen (the last of the new "all the years" lines), thus moving upward.

That being said...

"If we would just drop that special case when in non-smooth mode, then this problem would go away. That would again be a behavior change... :| ... It also makes for more contrast between smooth and non-smooth mode, showing that the later is intent on centering the cursor."

I'd support this change.  It would be more consistent, and Pico has nothing like the non-centering special case.

David Lawrence Ramsey <dolorous>
Group Member
Mon 17 Jul 2017 08:53:09 AM UTC, original submission:  

To reproduce, run:

  src/nano --ignore  +-1 README

Note that the cursor is below the line with "all the years".  Now press <PageDown>.  See how the cursor is now on the line with "all the years".  We hit <PageDown> and the cursor actually moved up in the file.  This is absurd.

Expected behavior: the cursor should never move backward in the file when hitting any forward moving key.

The problem is of course "caused" by the special case I've made: when near the end of the file, don't center the cursor but put it on the bottom row.  If we would just drop that special case when in non-smooth mode, then this problem would go away.  That would again be a behavior change...  :|  But... maybe it is for the best, because when running:

  src/nano --ignore --linenum --softwrap  +-1 doc/faq.html

the cursor is centered, when it shouldn't be.  So instead of fixing that case...  It also makes for more contrast between smooth and non-smooth mode, showing that the later is intent on centering the cursor.

Benno Schulenberg <bens>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dolorous (Posted a comment)
  • -email is unavailable- added by bens (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-13 bens Open/ClosedOpen Closed
    2017-07-18 bens Severity3 - Normal 2 - Minor
        StatusNone Wont Fix
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code