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

 
 

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

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

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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>
Project Administrator
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>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 13 Aug 2017 03:45:27 PM UTCbensOpen/ClosedOpen=>Closed
    Tue 18 Jul 2017 07:40:32 PM UTCbensSeverity3 - Normal=>2 - Minor
      StatusNone=>Wont Fix
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1