bugGNU nano - Bugs: bug #28722, nano-2.2.2 skips too many lines /...


bug #28722: nano-2.2.2 skips too many lines / positions cursor incorrectly when changing pages

Submitted by:  Mike Frysinger <vapier>
Submitted on:  Sun 24 Jan 2010 01:37:20 AM UTC  
Severity: 3 - NormalStatus: Fixed
Assigned to: Chris Allegretta <astyanax>Open/Closed: Closed

Add a New Comment(Rich Markup)

You are not logged in

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


Sun 04 Apr 2010 01:59:35 PM UTC, comment #5:

The SVN version seems to be working fine. I had nano 2.1.10 and nano SVN r4490 running in two separate windows on the 1000 line file, and gave them the identical input, and couldn't make out any difference in behaviour anymore. So the issue seems to be fixed, thank you. :)

Andreas Klauer <aklauer>
Sun 04 Apr 2010 03:55:19 AM UTC, comment #4:

Nope you're no crazy, when I fixed the issues with smooth scrolling in 2.2.3 I seem to have broken non-smooth scroling badly. Can you try http://www.nano-editor.org/dist/test/nano-2.2.4pre1.tar.gz or current SVN and see whether the problem is still occurring?

Chris Allegretta <astyanax>
Project AdministratorIn charge of this item.
Sat 03 Apr 2010 11:32:06 PM UTC, comment #3:

I'm utterly bewildered by the PageUp/PageDown scrolling behaviour of nano 2.2.3. It seems completely random. Sometimes it moves you a page down, and a page up, like it should. Sometimes it missed the mark by a few lines so PageDown-PageUp-PageDown-PageUp moved you up 6 lines. Sometimes it's so bad that PageDown only moves you down 2 lines instead of an entire page.

This happens so frequently that I can not edit code with nano anymore. Whenever I want to scroll to another part of the file, it seems like the file contents scroll by backwards, and I find myself at the top or bottom of the file, and I have to use the search function to jump back to the right place.

To test, I created a file with 1000 lines, each line being the line number so it's easy to see

for ((i=1; i < 1000; i++)) do echo $i >> foobar; done;

Then I edit this file with nano, in a standard xterm, it shows 19 lines. Cursor starts at line 1, col 1.

Using UP / DOWN / LEFT / RIGHT / PGUP / PGDN Keys x times = line, col

DOWN x15 = 16, 1 (normal)
PGDN x1 = 18, 1 (it jumped only 2 lines)
PGDN x10 = 38, 1 (it jumps only 2 lines every time)
PGUP x1 = 6, 1 (maybe normal, but it takes one pageup to cancel more than 11 pagedowns here)
PGDN x1 = 18, 1 (pagedown jumps 12 lines? normal?)
PGDN x1 = 30, 1 (again?)
PGUP x1 = 8, 1 (one pageup cancels out more than 2 pagedowns)

Can you reproduce this with 2.2.3? Is my nano strange?

I'll downgrade for now.

Andreas Klauer <aklauer>
Thu 18 Feb 2010 10:08:22 AM UTC, comment #2:

2.2.3 does work much better. only thing i noticed is if you put the cursor on the very last line and hit enter, the entire page gets reset so the cursor is in the middle. old behavior was only to shift by one line (same as if you hit the down arrow key).

Mike Frysinger <vapier>
Project Member
Sat 30 Jan 2010 09:48:25 AM UTC, comment #1:

Oh, I guess r4481 may have fixed both issues. I thought it may just be fixing the first issue. Let me know if it does not, and thanks for the report Mike, its getting kind of hard to remember what's supposed to happen with x combinations of flags :)

Chris Allegretta <astyanax>
Project AdministratorIn charge of this item.
Sun 24 Jan 2010 01:37:20 AM UTC, original submission:

start with a file which has more lines than the current terminal height (4x would be good)

move the cursor down to the middle of the page and hit page down. the cursor will be moved to the top -- this is incorrect (previous behavior had always been to remain where it was, and it works in 2.2.1).

start over but this time, move the cursor to the bottom of the page (the very last line). now when you hit page down, not only will the cursor move, but the entire second page be skipped (as if you hit page down twice in nano-2.2.1).

Mike Frysinger <vapier>
Project Member


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

Attach File(s):

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 bens (Updated the item)
  • -unavailable- added by aklauer (Posted a comment)
  • -unavailable- added by astyanax (Posted a comment)
  • -unavailable- added by vapier (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
    Sat 22 Feb 2014 07:59:22 PM UTCbensStatusReady For Test=>Fixed
      Assigned toNone=>astyanax
    Sat 30 Jan 2010 09:48:25 AM UTCastyanaxStatusNone=>Ready For Test

    Back to the top

    Powered by Savane 3.1-cleanup1