bugGNU nano - Bugs: bug #57425, automatic hard-wrapping can fail...


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

bug #57425: automatic hard-wrapping can fail with very long words when 'autoindent' is on

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Mon 16 Dec 2019 11:22:08 AM UTC
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


( Jump to the original submission )

Tue 24 Dec 2019 09:15:31 AM UTC, comment #6: 

The fix has been released in 4.7.

Benno Schulenberg <bens>
Project Administrator
Thu 19 Dec 2019 03:26:03 PM UTC, comment #5: 

This bug was for automatic hard-wrapping what bug #53986 was for justifying.  The two should have been fixed together, but... that is what you get when equivalent functionality exists in two different places.  :|

Benno Schulenberg <bens>
Project Administrator
Wed 18 Dec 2019 10:53:51 AM UTC, comment #4: 

In the bargain, this also fixed/avoided bug #57422.

Benno Schulenberg <bens>
Project Administrator
Wed 18 Dec 2019 10:38:51 AM UTC, comment #3: 

Fixed in git, commit a0055f36.

Benno Schulenberg <bens>
Project Administrator
Wed 18 Dec 2019 10:33:10 AM UTC, comment #2: 

A different manifestation of the bug is when not using --autoindent:

echo "  whataveryverylongwordisthis yes "  >longword
nano --ignore --break --fill=20  longword

Now type <Tab>.  See how the entire fragment of text gets pushed to the start of the next line.  This is silly.  The user tries to indent the fragment of text, and the result is: one line that consists of only whitespace and another line that has lost its indentation.  This is wrong.

Both forms of this bug are old: they have existed since at least version 2.0.6 (which is the oldest version that I have available and was able to compile).

Benno Schulenberg <bens>
Project Administrator
Mon 16 Dec 2019 01:08:45 PM UTC, comment #1: 

Proposed patch is attached.

(file #48070)

Benno Schulenberg <bens>
Project Administrator
Mon 16 Dec 2019 11:22:08 AM UTC, original submission:  

To reproduce, run:

echo "  whataveryverylongwordisthis yes "  >longword
nano --ignore --break --fill=20 --auto  longword

Then type <End> and type some words: "word word word".  See that the words do not get autowrapped to the next line.  Now type ^J.  The "yes" and the other words do get wrapped now.  This is what should have occurred automatically.

Now type M-U to restore the unjustified text, then <Home> <Del> <Del> to delete the two leading spaces, then <End> and "more words".  Now, as soon as you type something after the <End>, the "yes" and the rest of the text get wrapped to the next line.

In short: when --autoindent is in effect, then leading whitespace plus a long word that exceeds the wrapping width, will prevent automatic hard-wrapping from occurring.  This does not seem right.

Benno Schulenberg <bens>
Project Administrator


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

Attach Files:


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by bens (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.

    Only logged-in users can vote.





    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-24 bens Severity2 - Minor => 3 - Normal
        Open/ClosedOpen => Closed
    2019-12-18 bens StatusIn Progress => Fixed
    2019-12-16 bens Attached File- => Added 0001-wrapping-do-automatic-hard-wrapping-also-when-autoin.patch, #48070
        Severity3 - Normal => 2 - Minor
        StatusNone => In Progress
        Assigned toNone => bens

    Back to the top

    Powered by Savane 3.9