nano

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

commit f095e20a86d2440efe0de1c1d90a10a359049fb4
parent fa7e9b11df96a38bce2526ffc0db24b099b1e61c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 24 Jan 2018 09:56:03 +0100

tweaks: exclude --trimblanks when no wrapping or justifying is configured

Also, actually add the long option --trimblanks to the table.

Diffstat:
Msrc/nano.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -818,8 +818,10 @@ void usage(void) N_("Fix numeric keypad key confusion problem")); print_opt("-L", "--nonewlines", N_("Don't add newlines to the ends of files")); +#ifdef ENABLED_WRAPORJUSTIFY print_opt("-M", "--trimblanks", N_("Trim tail spaces when hard-wrapping")); +#endif #ifndef NANO_TINY print_opt("-N", "--noconvert", N_("Don't convert files from DOS/Mac format")); @@ -1918,6 +1920,9 @@ int main(int argc, char **argv) #endif {"rebindkeypad", 0, NULL, 'K'}, {"nonewlines", 0, NULL, 'L'}, +#ifdef ENABLED_WRAPORJUSTIFY + {"trimblanks", 0, NULL, 'M'}, +#endif {"morespace", 0, NULL, 'O'}, #ifdef ENABLE_JUSTIFY {"quotestr", 1, NULL, 'Q'}, @@ -2087,9 +2092,11 @@ int main(int argc, char **argv) case 'L': SET(NO_NEWLINES); break; +#ifdef ENABLED_WRAPORJUSTIFY case 'M': SET(TRIM_BLANKS); break; +#endif #ifndef NANO_TINY case 'N': SET(NO_CONVERT);