Commit a6804b5f authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Putting softwrap back among the "Appearance" toggles.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4851 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 15 additions and 10 deletions
+15 -10
......@@ -6,6 +6,8 @@
shortcuts for functions that are disabled.
* src/global.c (shortcut_init, strtosc): Define shortcut for the linter
when speller is disabled, and fix compilation with --disable-speller.
* src/global.c (shortcut_init, strtosc), doc/man/nanorc.5: Put softwrap
back among the "Appearance" toggles.
2014-05-06 Benno Schulenberg <bensberg@justemail.net>
* doc/texinfo/nano.texi: Let makeinfo figure out the node pointers.
......
......@@ -555,6 +555,9 @@ Toggle showing/hiding the blank line which 'separates' the 'title' from the file
.B smoothscroll
Toggle smooth scrolling when moving via the arrow keys.
.TP
.B softwrap
Toggle the displaying of overlong lines on multiple screen lines.
.TP
.B whitespacedisplay
Toggle the showing of whitespace.
.TP
......@@ -574,9 +577,6 @@ position to the end of the line.
.B nowrap
Toggle whether long lines will be hard-wrapped to the next line.
.TP
.B softwrap
Toggle the displaying of overlong lines on multiple screen lines.
.TP
.B tabstospaces
Toggle whether typed tabs will be converted to spaces.
.TP
......
......@@ -1092,24 +1092,27 @@ void shortcut_init(void)
add_to_sclist(MMAIN, "^Z", do_suspend_void, 0, FALSE);
#ifndef NANO_TINY
/* Group of "Appearance" toggles. */
add_to_sclist(MMAIN, "M-X", do_toggle_void, NO_HELP, TRUE);
add_to_sclist(MMAIN, "M-C", do_toggle_void, CONST_UPDATE, TRUE);
add_to_sclist(MMAIN, "M-O", do_toggle_void, MORE_SPACE, TRUE);
add_to_sclist(MMAIN, "M-S", do_toggle_void, SMOOTH_SCROLL, TRUE);
add_to_sclist(MMAIN, "M-$", do_toggle_void, SOFTWRAP, TRUE);
add_to_sclist(MMAIN, "M-P", do_toggle_void, WHITESPACE_DISPLAY, TRUE);
#ifndef DISABLE_COLOR
add_to_sclist(MMAIN, "M-Y", do_toggle_void, NO_COLOR_SYNTAX, TRUE);
#endif
/* Group of "Editing-behavior" toggles. */
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);
#ifndef DISABLE_WRAPPING
add_to_sclist(MMAIN, "M-L", do_toggle_void, NO_WRAP, TRUE);
#endif
add_to_sclist(MMAIN, "M-$", do_toggle_void, SOFTWRAP, TRUE);
add_to_sclist(MMAIN, "M-Q", do_toggle_void, TABS_TO_SPACES, TRUE);
/* Group of "Peripheral-feature" toggles. */
add_to_sclist(MMAIN, "M-B", do_toggle_void, BACKUP_FILE, TRUE);
#ifndef DISABLE_MULTIBUFFER
add_to_sclist(MMAIN, "M-F", do_toggle_void, MULTIBUFFER, TRUE);
......@@ -1219,6 +1222,8 @@ const char *flagtostr(int flag)
return N_("Use of one more line for editing");
case SMOOTH_SCROLL:
return N_("Smooth scrolling");
case SOFTWRAP:
return N_("Soft wrapping of overlong lines");
case WHITESPACE_DISPLAY:
return N_("Whitespace display");
case NO_COLOR_SYNTAX:
......@@ -1231,8 +1236,6 @@ const char *flagtostr(int flag)
return N_("Cut to end");
case NO_WRAP:
return N_("Hard wrapping of overlong lines");
case SOFTWRAP:
return N_("Soft wrapping of overlong lines");
case TABS_TO_SPACES:
return N_("Conversion of typed tabs to spaces");
case BACKUP_FILE:
......@@ -1360,6 +1363,10 @@ sc *strtosc(char *input)
s->scfunc = do_toggle_void;
s->execute = FALSE;
s->toggle = SMOOTH_SCROLL;
} else if (!strcasecmp(input, "softwrap")) {
s->scfunc = do_toggle_void;
s->execute = FALSE;
s->toggle = SOFTWRAP;
} else if (!strcasecmp(input, "whitespacedisplay")) {
s->scfunc = do_toggle_void;
s->execute = FALSE;
......@@ -1388,10 +1395,6 @@ sc *strtosc(char *input)
s->execute = FALSE;
s->toggle = NO_WRAP;
#endif
} 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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment