From 894aff0816979dc8357013c27d17b0fe5fb48fd9 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 25 Jan 2019 19:25:39 +0100 Subject: [PATCH] options: let --fill no longer imply automatic hard-wrapping Now --fill only sets the target width for hard-wrapping and justifying, but automatic hard-wrapping itself is switched on with --breaklonglines. --- src/nano.c | 5 +---- src/rcfile.c | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/nano.c b/src/nano.c index 9f614907..3345a3e5 100644 --- a/src/nano.c +++ b/src/nano.c @@ -878,7 +878,7 @@ void usage(void) print_opt("-p", "--preserve", N_("Preserve XON (^Q) and XOFF (^S) keys")); #ifdef ENABLED_WRAPORJUSTIFY print_opt(_("-r <#cols>"), _("--fill=<#cols>"), - N_("Set hard-wrapping point at column #cols")); + N_("Set width for hard-wrap and justify")); #endif #ifdef ENABLE_SPELLER if (!ISSET(RESTRICTED)) @@ -2271,9 +2271,6 @@ int main(int argc, char **argv) } #ifdef ENABLE_NANORC fill_used = TRUE; -#endif -#ifdef ENABLE_WRAPPING - SET(BREAK_LONG_LINES); #endif break; #endif diff --git a/src/rcfile.c b/src/rcfile.c index c81fd7d7..295a94d5 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -1111,8 +1111,7 @@ void parse_rcfile(FILE *rcstream, bool syntax_only) rcfile_error(N_("Requested fill size \"%s\" is invalid"), option); fill = -COLUMNS_FROM_EOL; - } else - UNSET(NO_WRAP); + } free(option); } else #endif