diff -Nru nano-1.2.5/nano.1 nano-1.2.5-mine/nano.1 --- nano-1.2.5/nano.1 2003-06-28 22:25:46.000000000 -0400 +++ nano-1.2.5-mine/nano.1 2005-07-12 18:21:25.000000000 -0400 @@ -88,6 +88,12 @@ .B \-V (\-\-version) Show the current version number and author. .TP +.B \-W (\-\-wrap) +Override "nowrap" from +.I .nanorc +or the \-\-disable\-wrapping\-as\-root configure option from the command +line. +.TP .B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP) Specify a specific syntax highlighting from the .I .nanorc diff -Nru nano-1.2.5/nano.c nano-1.2.5-mine/nano.c --- nano-1.2.5/nano.c 2005-03-22 10:04:02.000000000 -0500 +++ nano-1.2.5-mine/nano.c 2005-07-22 16:45:33.748087408 -0400 @@ -3039,6 +3039,7 @@ const shortcut *s; int keyhandled = 0; /* Have we handled the keystroke yet? */ int kbinput = -1; /* Input from keyboard */ + int reenable_wrapping = 0; /* override NO_WRAP from command line */ #ifndef NANO_SMALL const toggle *t; @@ -3090,6 +3091,7 @@ {"view", 0, 0, 'v'}, #ifndef DISABLE_WRAPPING {"nowrap", 0, 0, 'w'}, + {"wrap", 0, 0, 'W'}, #endif {"nohelp", 0, 0, 'x'}, {"suspend", 0, 0, 'z'}, @@ -3120,11 +3122,11 @@ #endif #ifdef HAVE_GETOPT_LONG - while ((optchr = getopt_long(argc, argv, "h?BDFHIKMNQ:RST:VY:abcefgijklmo:pr:s:tvwxz", + while ((optchr = getopt_long(argc, argv, "h?BDFHIKMNQ:RST:VWY:abcefgijklmo:pr:s:tvwxz", long_options, &option_index)) != -1) { #else while ((optchr = - getopt(argc, argv, "h?BDFHIKMNQ:RST:VY:abcefgijklmo:pr:s:tvwxz")) != -1) { + getopt(argc, argv, "h?BDFHIKMNQ:RST:VWY:abcefgijklmo:pr:s:tvwxz")) != -1) { #endif switch (optchr) { @@ -3207,6 +3209,12 @@ case 'V': version(); exit(0); +#ifndef DISABLE_WRAPPING + case 'W': + UNSET(NO_WRAP); + reenable_wrapping = 1; + break; +#endif #ifdef ENABLE_COLOR case 'Y': syntaxstr = mallocstrcpy(syntaxstr, optarg); @@ -3272,6 +3280,7 @@ #ifndef DISABLE_WRAPPING case 'w': SET(NO_WRAP); + reenable_wrapping = 0; break; #endif case 'x': @@ -3349,6 +3358,11 @@ #endif #endif /* ENABLE_NANORC */ +#ifndef DISABLE_WRAPPING + if (reenable_wrapping) + UNSET(NO_WRAP); +#endif + #ifndef NANO_SMALL history_init(); #ifdef ENABLE_NANORC diff -Nru nano-1.2.5/nano.texi nano-1.2.5-mine/nano.texi --- nano-1.2.5/nano.texi 2005-05-15 23:51:16.000000000 -0400 +++ nano-1.2.5-mine/nano.texi 2005-07-12 18:38:48.000000000 -0400 @@ -154,6 +154,10 @@ @item -V, --version Print the version number and copyright and quit. address@hidden -W, --wrap +Override "nowrap" from .nanorc or the (@code{--disable-wrapping-as-root}) +configure option from the command line. + @item -Y, --syntax=[str] Specify a specific syntax highlighting from the .nanorc to use, if available.