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

 
 

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

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

Submitter:  Benno Schulenberg <bens>
Submitted:  Thu 20 Jul 2017 07:42:11 AM UTC
   
 
Severity:  5 - Blocker Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

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>
Group Member
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>
Group Member
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>
Group administrator
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>
Group administrator

 

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

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
  • -email is unavailable- added by dolorous (Updated the item)
  • -email is unavailable- added by bens (Submitted the item)
  • -email is unavailable- added by bens
  •  

    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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-07-22 bens Open/ClosedOpen Closed
    2017-07-20 dolorous Attached File- Added cap-removal-try-2.patch, #41266
    2017-07-20 bens Severity3 - Normal 5 - Blocker
        StatusIn Progress Fixed
        Assigned toNone bens
    2017-07-20 bens Carbon-Copy- Added dolorous

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code