bugGNU nano - Bugs: bug #46492, option --fill does not override...


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

bug #46492: option --fill does not override "set fill" when --nowrap is given

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Sat 21 Nov 2015 02:01:24 PM UTC  
Severity:  3 - Normal Status:  Fixed
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Closed

Sat 21 Nov 2015 08:24:14 PM UTC, comment #2: 

Fixed in SVN, r5428.

One little problem remains: the order of "set nowrap" and "set fill" in a nanorc file does not matter -- when both are given, automatic wrapping is always turned off; the fill option just gives the width to be used for manual justification with ^J.  I will leave this as it is, as it is quite possible that some people expect this behaviour now.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 21 Nov 2015 02:52:43 PM UTC, comment #1: 

Ehm... I am confusing automatic line wrapping with ^J intentional justifying.  When --nowrap is given, this indeed prevents automatic line wrapping, but it still allows the user to justify any or all paragraphs to a certain width.

However, there still is a small problem.  Version 2.1.11 (and I imagine all versions before that) would allow a --fill option on the command line to override a "set fill" given in a nanorc file (and then a subsequent --nowrap to switch off automatic wrapping).  But in version 2.2.2 (and all later ones), an option --nowrap discards any earlier --fill value on the command line and instead reverts to the fill value given in an rc file.  This is wrong.  It would require modifying the nanorc file if for some file you want a different justification width (for certain paragraphs) but still want to run without automatic wrapping.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 21 Nov 2015 02:01:24 PM UTC, original submission:  

Running 'src/nano --fill=23 --nowrap README' still wraps text at column 23.  It does not do what the man page says about these options: "the last one given takes effect".

Of course it is somewhat silly to specify both --fill and --nowrap on the command line, but... when "set fill 12" is added to a nanorc file, then still a --nowrap command-line does not override this.

This seems wrong to me.  But nano has been not obeying the command line already since version 2.1.10 ( I haven't tested further back).  Strange that no one ever complained!

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.


No files currently attached


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)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-07 bens Open/ClosedOpen => Closed
    2015-11-21 bens StatusNone => Fixed
    2015-11-21 bens Severity4 - Important => 3 - Normal
        Summaryoption --nowrap does not override --fill => option --fill does not override "set fill" when --nowrap is given

    Back to the top

    Powered by Savane 3.5