bugGNU nano - Bugs: bug #42188, soft-wrapping does not always show...


bug #42188: soft-wrapping does not always show all that it could

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Thu Apr 24 19:23:26 2014  
Severity: 3 - NormalStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


Sat Jan 9 20:21:48 2016, comment #5:

When the softwrapped part of a line is painted onto the screen, the zero-based line number gets incremented at the /start/ of the for loop, meaning that the test in the 'for' statement should test for one line /less/.

(Why the painting of this extra line has the effect it has, I don't know -- it goes outside the edit window; ncurses should completely ignore it, or beep furiuously, or whatever, but not mess up the preceding line.)

Fixed in SVN, r5539.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed Jun 11 17:41:16 2014, comment #4:

Okay. Looking into this more, I've noticed that uncolored portions of lines sometimes have the last character replaced with a space. If I follow your instructions, but hit M-= four times instead of once, the last line on the screen ends with

"Later, ^G came back in p "

but pressing M-= one more time to scroll up once past that line changes it to

"Later, ^G came back in pl"
[Next line: "ace of ^_"]

David Lawrence Ramsey <dolorous>
Project Administrator
Wed Jun 11 07:14:52 2014, comment #3:

Toggling nohelp and/or morespace on or off does not make the bug go away -- one just has to find another line with a coloured item that, when it lands on the final screen line, triggers the bug.

For example, with 30 lines and 120 columns and src/nano +0 -Ox$ doc/faq.html, search for "incoming" (without the quotes), and hit M-= once. The bottom line seems to end with name="4.8". But hit M-= once more, and the rest of the lines appears.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed Jun 11 01:53:47 2014, comment #2:

I just tried this in SVN r4955. After following all the instructions to reproduce the bug, I've noticed that expert mode (the -x/--nohelp option) affects it. Specifically, the bug doesn't occur if expert mode is on, but does if expert mode is off; toggling expert mode on and off via Meta-X makes the missing rest of the line appear and disappear. (For the record, I use --morespace and --nohelp by default.)

David Lawrence Ramsey <dolorous>
Project Administrator
Thu Apr 24 19:29:05 2014, comment #1:

It has to do with syntax colouring. When switching colouring off, the bottom line is show properly, using its full available length.

(This is both in SVN and my distro's 2.2.2.)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu Apr 24 19:23:26 2014, original submission:

To reproduce: Set your terminal to 30 lines and 120 columns. Open doc/faq.html, enable soft-wrapping, then search for the word "bizarre" (without the quotes). Now strike six times M-= (scroll without moving cursor). The word "bizarre" is now on the top line of the screen. On the bottom line the text seems to end shortly after the middle with "Pico mode" -- but that is in fact not the end of that line in the file: nano is making a mistake there. Do another M-= to see the missing ", nano is and has always been...".

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):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Jan 14 16:37:57 2016bensOpen/ClosedOpen=>Closed
    Sat Jan 9 20:21:48 2016bensStatusNone=>Fixed
      Assigned toNone=>bens
      SummarySoft-wrapping does not always show all that it could=>soft-wrapping does not always show all that it could

    Back to the top

    Powered by Savane 3.1-cleanup1