From cb80ca51b46587c257f65255ecd92fee46848f25 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 19 Mar 2014 21:09:08 +0000 Subject: [PATCH] Grouping 'softwrap' with the toggles that affect how things look. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4658 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ doc/man/nanorc.5 | 6 +++--- src/global.c | 14 +++++++------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1a01664..3d84ad6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ * doc/nanorc.sample.in - Sort the includes alphabetically, and add the ones for Lua, Magicpoint, and Spec files. * doc/nanorc.sample.in - Add "poslog", plus tiny textual tweaks. + * src/global.c, doc/man/nanorc.5 - Group softwrap with the toggles + that affect how things look -- it does not belong in the group of + general program functions, nor in the group of editing behaviour. 2014-03-18 Benno Schulenberg * src/global.c (shortcut_init) - In the file browser one cannot diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5 index 582aece2..dea149d1 100644 --- a/doc/man/nanorc.5 +++ b/doc/man/nanorc.5 @@ -511,6 +511,9 @@ Toggle smooth scrolling when moving via the arrow keys. .B whitespacedisplay Toggle whether whitespace is shown. .TP +.B softwrap +Toggle whether long lines will be displayed on multiple screen lines. +.TP .B smarthome Toggle whether the smart home key function is enabled. .TP @@ -524,9 +527,6 @@ position to the end of the line. .B nowrap Toggle whether long lines will be wrapped to the next line. .TP -.B softwrap -Toggle whether long lines will be displayed over multiple screen lines. -.TP .B suspendenable Toggle whether the suspend sequence (normally ^Z) will suspend the editor window. .TP diff --git a/src/global.c b/src/global.c index 21bc27eb..e5fdc679 100644 --- a/src/global.c +++ b/src/global.c @@ -1272,6 +1272,7 @@ void shortcut_init(bool unjustify) add_to_sclist(MMAIN, "M-S", do_toggle_void, SMOOTH_SCROLL, TRUE); add_to_sclist(MMAIN, "M-P", do_toggle_void, WHITESPACE_DISPLAY, TRUE); add_to_sclist(MMAIN, "M-Y", do_toggle_void, NO_COLOR_SYNTAX, TRUE); + add_to_sclist(MMAIN, "M-$", do_toggle_void, SOFTWRAP, TRUE); add_to_sclist(MMAIN, "M-H", do_toggle_void, SMART_HOME, TRUE); add_to_sclist(MMAIN, "M-I", do_toggle_void, AUTOINDENT, TRUE); add_to_sclist(MMAIN, "M-K", do_toggle_void, CUT_TO_END, TRUE); @@ -1282,7 +1283,6 @@ void shortcut_init(bool unjustify) add_to_sclist(MMAIN, "M-M", do_toggle_void, USE_MOUSE, TRUE); add_to_sclist(MMAIN, "M-N", do_toggle_void, NO_CONVERT, TRUE); add_to_sclist(MMAIN, "M-Z", do_toggle_void, SUSPEND, TRUE); - add_to_sclist(MMAIN, "M-$", do_toggle_void, SOFTWRAP, TRUE); #endif /* !NANO_TINY */ add_to_sclist(MHELP|MBROWSER, "^C", do_exit, 0, TRUE); @@ -1360,6 +1360,8 @@ const char *flagtostr(int flag) return N_("Whitespace display"); case NO_COLOR_SYNTAX: return N_("Color syntax highlighting"); + case SOFTWRAP: + return N_("Soft line wrapping"); case SMART_HOME: return N_("Smart home key"); case AUTOINDENT: @@ -1380,8 +1382,6 @@ const char *flagtostr(int flag) return N_("No conversion from DOS/Mac format"); case SUSPEND: return N_("Suspension"); - case SOFTWRAP: - return N_("Soft line wrapping"); default: return "?????"; } @@ -1508,6 +1508,10 @@ sc *strtosc(int menu, char *input) s->scfunc = do_toggle_void; s->execute = FALSE; s->toggle = NO_COLOR_SYNTAX; + } else if (!strcasecmp(input, "softwrap")) { + s->scfunc = do_toggle_void; + s->execute = FALSE; + s->toggle = SOFTWRAP; } else if (!strcasecmp(input, "smarthome")) { s->scfunc = do_toggle_void; s->execute = FALSE; @@ -1524,10 +1528,6 @@ sc *strtosc(int menu, char *input) s->scfunc = do_toggle_void; s->execute = FALSE; s->toggle = NO_WRAP; - } else if (!strcasecmp(input, "softwrap")) { - s->scfunc = do_toggle_void; - s->execute = FALSE; - s->toggle = SOFTWRAP; } else if (!strcasecmp(input, "tabstospaces")) { s->scfunc = do_toggle_void; s->execute = FALSE; -- 2.39.5