From e14127b84371b9f5b78cff1a2d37753980d03a6c Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 2 Jan 2021 17:06:36 +0100 Subject: [PATCH] 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. --- doc/nano.texi | 3 ++- doc/nanorc.5 | 3 ++- src/rcfile.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/nano.texi b/doc/nano.texi index 3141f1f0..90141b4e 100644 --- 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 index cf4b85ef..b2a1cb26 100644 --- 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 index 71e98bff..3c7b4e0e 100644 --- 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"))