bugGNU nano - Bugs: bug #51514, in current git, the screen does...

 
 

bug #51514: in current git, the screen does not scroll properly when inserting a small file

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Thu 20 Jul 2017 07:42:11 AM UTC  
 
Severity: 5 - BlockerStatus: Fixed
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.

 

Thu 20 Jul 2017 08:51:38 PM UTC, comment #3:

...and that patch breaks proper scrolling downward when leaving the cursor in the middle row of the screen and uncutting a larger chunk, so never mind. For now, the current code works, and any other fix I'll put in the patch tracker instead.

David Lawrence Ramsey <dolorous>
Project Administrator
Thu 20 Jul 2017 03:39:27 PM UTC, comment #2:

Oky.

After some quick testing (I need to do more to be sure), the attached patch removes the cap and fixes this issue.

The logic in place_the_cursor() is odd regarding forreal: the cursor is only placed at the calculated row if the row's in screen range, but if forreal is TRUE, current_y is set to the calculated row regardless of whether the row's in screen range. The other half of the patch ensures that current_y is left unchanged if the row's out of range; I still have to verify that doing that doesn't cause new problems.

(file #41266)

David Lawrence Ramsey <dolorous>
Project Administrator
Thu 20 Jul 2017 07:49:35 AM UTC, comment #1:

Fixed in git, a1fba434.

David, if you have a better fix, one that affects only the relevant call of go_back_chunks(), I will be happy to apply that. But for the release we'll stick with this one.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 20 Jul 2017 07:42:11 AM UTC, original submission:

To reproduce, I will use a paste instead of an insert. So run:

src/nano --ignore --smooth NEWS

Type ^K five times, then move the cursor to the bottom row of the screen, then type ^U. See how seemingly just one line is pasted and the cursor sits at the end of that line. But when you hit the arrow keys, the cursor does not move.

The offending commit is ce68f81b. When I undo the half that affects go_back_chunks(), the bug goes away.

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:
   

Attached Files
file #41266:  cap-removal-try-2.patch added by dolorous (837B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dolorous (Updated the item)
  • -unavailable- added by bens (Submitted the item)
  • -unavailable- added by bens
  •  

    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
    Sat 22 Jul 2017 07:20:38 PM UTCbensOpen/ClosedOpen=>Closed
    Thu 20 Jul 2017 03:39:27 PM UTCdolorousAttached File-=>Added cap-removal-try-2.patch, #41266
    Thu 20 Jul 2017 07:49:35 AM UTCbensSeverity3 - Normal=>5 - Blocker
      StatusIn Progress=>Fixed
      Assigned toNone=>bens
    Thu 20 Jul 2017 07:42:11 AM UTCbensCarbon-Copy-=>Added dolorous

    Back to the top


    Powered by Savane 3.1-cleanup1