nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit e14127b84371b9f5b78cff1a2d37753980d03a6c
parent 67cdd71352cbea5b1aa83d1b143c66dcaeca2509
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat,  2 Jan 2021 17:06:36 +0100

rcfile: rename 'nowrap' toggle to 'breaklonglines', to match the option

Now all toggle functions have the same name as their corresponding
long command-line option.  Also, all names now indicate the effect
of the toggle when it is invoked from a default setting.

Diffstat:
Mdoc/nano.texi | 3++-
Mdoc/nanorc.5 | 3++-
Msrc/rcfile.c | 3++-
3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/doc/nano.texi b/doc/nano.texi @@ -1678,8 +1678,9 @@ is the beginning of a paragraph. Toggles whether cutting text will cut the whole line or just from the current cursor position to the end of the line. -@item nowrap +@item breaklonglines Toggles whether long lines will be hard-wrapped to the next line. +(The old name of this function, 'nowrap', is deprecated.) @item tabstospaces Toggles whether typed tabs will be converted to spaces. diff --git a/doc/nanorc.5 b/doc/nanorc.5 @@ -918,8 +918,9 @@ is the beginning of a paragraph. Toggles whether cutting text will cut the whole line or just from the current cursor position to the end of the line. .TP -.B nowrap +.B breaklonglines Toggles whether long lines will be hard-wrapped to the next line. +(The old name of this function, 'nowrap', is deprecated.) .TP .B tabstospaces Toggles whether typed tabs will be converted to spaces. diff --git a/src/rcfile.c b/src/rcfile.c @@ -476,7 +476,8 @@ keystruct *strtosc(const char *input) else if (!strcmp(input, "cutfromcursor")) s->toggle = CUT_FROM_CURSOR; #ifdef ENABLE_WRAPPING - else if (!strcmp(input, "nowrap")) + else if (!strcmp(input, "breaklonglines") || + !strcmp(input, "nowrap")) /* Deprecated; remove in 2024. */ s->toggle = BREAK_LONG_LINES; #endif else if (!strcmp(input, "tabstospaces"))