bugGNU nano - Bugs: bug #50691, with softwrap, nano can leave...

 
 

bug #50691: with softwrap, nano can leave lines undrawn when scrolling down

Submitted by:  David Lawrence Ramsey <dolorous>
Submitted on:  Fri 31 Mar 2017 03:24:26 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.

 

(Jump to the original submission Jump to the original submission)

Tue 04 Apr 2017 09:04:23 AM UTC, comment #6:

Okay, I have observed the effect.

Patch applied (modified) and pushed, f9a8d6ff. Thanks.

Benno Schulenberg <bens>
Project Administrator
Mon 03 Apr 2017 11:33:56 PM UTC, comment #5:

Never mind the comment #1/#2 confusion; I know what you mean. (It's odd that comments start being numbered at 1 after the original comment.)

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Mon 03 Apr 2017 08:00:57 PM UTC, comment #4:

Did you mean comment #2 with regards to "showing up immediately"?

You may not be able to see the problem because the nano binaries aren't identical between your machine and mine. Here's a better example.

1. Load the attached file "nanotest" (which is just the first two long lines of my machine's nano binary, plus a magicline) with current git, using the following options:

stty cols 80 && stty rows 24 && src/nano +,1521 --ignore --soft --const nanotest

2. Press Down 11 times. The cursor should be on the rightmost column of the screen, and the constant cursor position display should say that you're on "line 1/3 (33%), col 2400/2497 (96%), char 1299/6334 (20%)". Note that nothing after line 1 is drawn.

3. Press Ctrl-L. Note that line 2 gets properly drawn.

The patch in comment #2 fixes the problem so that line 2 is drawn without needing to press Ctrl-L.

(file #40245)

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Mon 03 Apr 2017 07:22:35 PM UTC, comment #3:

I don't understand what you mean in comment #1 with the problem showing up immediately. I don't see any screen line not getting updated -- it's hard to see anyway, it's all gibberish, lots of ^@s with a few other characters strewn in between. And if after the eleventh <Down> (and the screen has scrolled half a page), I type ^L, I don't see anything change. So it looks to me all lines get drawn allright.

Benno Schulenberg <bens>
Project Administrator
Sat 01 Apr 2017 07:43:11 PM UTC, comment #2:

It turns out my previous fix in 93c6248 wasn't quite right. If edittop is partially scrolled offscreen, and edit_scroll() scrolls it more offscreen, those chunks of edittop involved in scrolling do need to be compensated for (although the ones before firstcolumn still don't).

The attached patch against current git seems to fix it.

(file #40228)

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Sat 01 Apr 2017 07:20:10 PM UTC, comment #1:

There's an easier way to reproduce it:

stty cols 80 && stty rows 24 && src/nano +,1521 --ignore --soft src/nano

Pressing Down 11 times after that will make the screen scroll once and make the problem show up immediately.

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Fri 31 Mar 2017 03:24:26 PM UTC, original submission:

(instructions taken from bug #50687.)

To reproduce, run:

stty cols 80 && stty rows 24 && src/nano --ignore --soft src/nano

(Yes, that means opening nano's binary with nano itself.)

Now press and hold <Down>. Just before reaching the last row, the cursor gets stuck on the "^" of a "^@" that straddles the row boundary. (Or if your binary is much different, it might get stuck on a replacement character, �, indicating an invalid starter byte.)

----------

If you do this, move the cursor left so it gets unstuck, and then continually scroll down (moving left when necessary to unstick the cursor as needed), some lines aren't drawn when scrolling. This is most likely related to the edit_scroll() revamp to make edit_scroll() draw fewer lines, since it worked before that, aside from the cursor getting stuck.

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:
   

Attached Files
file #40245:  nanotest added by dolorous (6KiB - application/octet-stream)

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 14 Apr 2017 08:44:24 AM UTCbensOpen/ClosedOpen=>Closed
    Tue 04 Apr 2017 09:04:23 AM UTCbensStatusNone=>Fixed
      Assigned toNone=>dolorous
    Mon 03 Apr 2017 08:00:57 PM UTCdolorousAttached File-=>Added nanotest, #40245
    Sat 01 Apr 2017 07:43:11 PM UTCdolorousAttached File-=>Added 0001-display-properly-compensate-for-chunks-before-firstc.patch, #40228

    Back to the top


    Powered by Savane 3.1-cleanup1