bugGNU nano - Bugs: bug #53933, nano misjustifies when paragraphs...

 
 

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

bug #53933: nano misjustifies when paragraphs begin with less indentation instead of more

Submitter:  Benno Schulenberg <bens>
Submitted:  Thu 17 May 2018 06:40:12 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Tue 29 May 2018 07:15:35 AM UTC, comment #2: 

Fixed in git, by commits 432a7d77 and d7fe5a7d.

Benno Schulenberg <bens>
Group administrator
Mon 21 May 2018 08:59:52 AM UTC, comment #1: 

See the attached patch for a fix for point 1). See bug #53932 for a "fix" for point 2).

(file #44188)

Benno Schulenberg <bens>
Group administrator
Thu 17 May 2018 06:40:12 PM UTC, original submission:  

To reproduce, first remove the blank lines from the NEWS file:

  sed -i /^$/d  NEWS

Then run:

  pico +1 NEWS

and type ^J several times.  Note that Pico considers the unindented lines as separate paragraphs, and that it leaves the 13 spaces indent of the indented pieces of text intact when it rewraps them.

Now exit without saving and run:

  nano --ignore +1 NEWS

and type ^J several times.  Wow!  Nano treats each line as a separate paragraph.  Wrong.

Exit without saving and run:

  nano --ignore --autoindent +1 NEWS

and type ^J several times.  Oww!  Nano leaves only the indentation of the second line intact, makes the indentation of the rest of the paragraph zero, and includes the first line of what is actually the next paragraph into the rewrapping, effectively creating a mess.  Wrong!!

Expected behavior: 1) nano should not need the --autoindent option to do the right thing for indented paragraphs.  2) if a later line has a different indentation than the second line of the paragraph, then it is not part of the paragrph any more -- it is the start of a new one.

Benno Schulenberg <bens>
Group administrator

 

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

 

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.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-02 bens Open/ClosedOpen Closed
    2018-05-29 bens StatusIn Progress Fixed
    2018-05-21 bens Attached File- Added 0001-justification-recognize-indented-paragraphs-also-wit.patch, #44188
        StatusNone In Progress
    2018-05-21 bens Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code