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

 
 

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

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

Submitter:  David Lawrence Ramsey <dolorous>
Submitted:  Fri 31 Mar 2017 03:24:26 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  dolorous Open/Closed:  Closed

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

 

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

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

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

    Date Changed by Updated Field Previous Value => Replaced by
    2017-04-14 bens Open/ClosedOpen Closed
    2017-04-04 bens StatusNone Fixed
        Assigned toNone dolorous
    2017-04-03 dolorous Attached File- Added nanotest, #40245
    2017-04-01 dolorous Attached File- Added 0001-display-properly-compensate-for-chunks-before-firstc.patch, #40228

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code