diff --git a/ChangeLog b/ChangeLog index e1a016645318130165d44eb489d3b098b4bd7a89..3d84ad6a6ee8c7d5723954de827f64e981dc25c0 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 <bensberg@justemail.net> * src/global.c (shortcut_init) - In the file browser one cannot diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5 index 582aece21a16ae6e03d43901d4b83bd3f6740957..dea149d171f16e5c30d641253e5a01b39a25bc30 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 21bc27eb6bb1d11a8b4ce559b2eb27cd66fb3fc8..e5fdc6793bee5c4f2bd147f0ad5fba9988132191 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;