bugGNU nano - Bugs: bug #50645, with softwrap, PageUp/PageDown...

 
 

bug #50645: with softwrap, PageUp/PageDown glitches the display without smooth scrolling

Submitted by:  David Lawrence Ramsey <dolorous>
Submitted on:  Sun 26 Mar 2017 11:54:28 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: David Lawrence Ramsey <dolorous>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 27 Mar 2017 09:46:12 AM UTC, comment #2:

Fixed in git, 384332d0. Thanks for the patch.

(Closing, because an unreleased bug.)

Benno Schulenberg <bens>
Project Administrator
Sun 26 Mar 2017 11:56:21 PM UTC, comment #1:

The attached patch fixes this.

(file #40157)

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Sun 26 Mar 2017 11:54:28 PM UTC, original submission:

With current git, in an 80x24 terminal, with the attached file paragraph.txt, run:

nano +12 --ignore --softwrap paragraph.txt

Press PageDown, so that the screen scrolls (it shouldn't do this, since it's at the bottom of the file, but that's a separate bug), and then press PageUp. The cursor will be placed back at the top of the file, but the top line won't change until you press PageUp again (Ctrl-L won't work).

This is caused by PageUp and PageDown's not handling the case where softwrap is on, smooth scrolling is off, and the line at the top of the screen is partially scrolled offscreen.

Specifically, nano sets current to edittop and placewewant to zero to put the cursor at the beginning of the top line of the file. However, if the top line is partially offscreen, this is incorrect, since the line begins at firstcolumn, not zero. Furthermore, nano changes placewewant here, but doesn't change target_column to match. Since target_column is set based on the value of placewewant whether we're in softwrap mode or not, this means the line is drawn incorrectly.

David Lawrence Ramsey <dolorous>
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:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Posted a comment)
  • -unavailable- added by dolorous (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 27 Mar 2017 09:46:12 AM UTCbensStatusNone=>Fixed
      Assigned toNone=>dolorous
      Open/ClosedOpen=>Closed
      SummaryPageUp/PageDown glitches display with softwrap and without smooth scrolling=>with softwrap, PageUp/PageDown glitches the display without smooth scrolling
    Sun 26 Mar 2017 11:56:21 PM UTCdolorousAttached File-=>Added 0001-display-fix-PageUp-PageDown-display-glitches-without.patch, #40157
    Sun 26 Mar 2017 11:54:28 PM UTCdolorousAttached File-=>Added paragraph.txt, #40156

    Back to the top


    Powered by Savane 3.1-cleanup1