Moving (the recognition of) the toggles to the end, like everywhere else.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5030 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
d4623f3ca3
commit
0a1e56ed3c
|
@ -8,6 +8,7 @@
|
|||
in menus with a prompt. The only two exceptions are 'do_cancel' and
|
||||
'do_gotolinecolumn_void'. The first is handled specially, so do that
|
||||
too for the second and then get to drop 140 parameters.
|
||||
* src/global.c (strtosc): Move recognition of the toggles to the end.
|
||||
|
||||
2014-06-27 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/global.c (shortcut_init): Add default keybindings for Cut,
|
||||
|
|
123
src/global.c
123
src/global.c
|
@ -1331,68 +1331,6 @@ sc *strtosc(char *input)
|
|||
s->scfunc = get_history_newer_void;
|
||||
}
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
else if (!strcasecmp(input, "nohelp")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = NO_HELP;
|
||||
} else if (!strcasecmp(input, "constupdate")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = CONST_UPDATE;
|
||||
} else if (!strcasecmp(input, "morespace")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = MORE_SPACE;
|
||||
} else if (!strcasecmp(input, "smoothscroll")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = SMOOTH_SCROLL;
|
||||
} else if (!strcasecmp(input, "softwrap")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = SOFTWRAP;
|
||||
} else if (!strcasecmp(input, "whitespacedisplay")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = WHITESPACE_DISPLAY;
|
||||
#ifndef DISABLE_COLOR
|
||||
} else if (!strcasecmp(input, "nosyntax")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = NO_COLOR_SYNTAX;
|
||||
#endif
|
||||
} else if (!strcasecmp(input, "smarthome")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = SMART_HOME;
|
||||
} else if (!strcasecmp(input, "autoindent")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = AUTOINDENT;
|
||||
} else if (!strcasecmp(input, "cuttoend")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = CUT_TO_END;
|
||||
#ifndef DISABLE_WRAPPING
|
||||
} else if (!strcasecmp(input, "nowrap")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = NO_WRAP;
|
||||
#endif
|
||||
} else if (!strcasecmp(input, "tabstospaces")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = TABS_TO_SPACES;
|
||||
} else if (!strcasecmp(input, "backupfile")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = BACKUP_FILE;
|
||||
#ifndef DISABLE_MULTIBUFFER
|
||||
} else if (!strcasecmp(input, "multibuffer")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = MULTIBUFFER;
|
||||
#endif
|
||||
#ifndef DISABLE_MOUSE
|
||||
} else if (!strcasecmp(input, "mouse")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = USE_MOUSE;
|
||||
#endif
|
||||
} else if (!strcasecmp(input, "noconvert")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = NO_CONVERT;
|
||||
} else if (!strcasecmp(input, "suspendenable")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = SUSPEND;
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
else if (!strcasecmp(input, "left") ||
|
||||
!strcasecmp(input, "back"))
|
||||
s->scfunc = do_left;
|
||||
|
@ -1483,6 +1421,67 @@ sc *strtosc(char *input)
|
|||
} else if (!strcasecmp(input, "lastfile")) {
|
||||
s->scfunc = do_last_file;
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
} else if (!strcasecmp(input, "nohelp")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = NO_HELP;
|
||||
} else if (!strcasecmp(input, "constupdate")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = CONST_UPDATE;
|
||||
} else if (!strcasecmp(input, "morespace")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = MORE_SPACE;
|
||||
} else if (!strcasecmp(input, "smoothscroll")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = SMOOTH_SCROLL;
|
||||
} else if (!strcasecmp(input, "softwrap")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = SOFTWRAP;
|
||||
} else if (!strcasecmp(input, "whitespacedisplay")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = WHITESPACE_DISPLAY;
|
||||
#ifndef DISABLE_COLOR
|
||||
} else if (!strcasecmp(input, "nosyntax")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = NO_COLOR_SYNTAX;
|
||||
#endif
|
||||
} else if (!strcasecmp(input, "smarthome")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = SMART_HOME;
|
||||
} else if (!strcasecmp(input, "autoindent")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = AUTOINDENT;
|
||||
} else if (!strcasecmp(input, "cuttoend")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = CUT_TO_END;
|
||||
#ifndef DISABLE_WRAPPING
|
||||
} else if (!strcasecmp(input, "nowrap")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = NO_WRAP;
|
||||
#endif
|
||||
} else if (!strcasecmp(input, "tabstospaces")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = TABS_TO_SPACES;
|
||||
} else if (!strcasecmp(input, "backupfile")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = BACKUP_FILE;
|
||||
#ifndef DISABLE_MULTIBUFFER
|
||||
} else if (!strcasecmp(input, "multibuffer")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = MULTIBUFFER;
|
||||
#endif
|
||||
#ifndef DISABLE_MOUSE
|
||||
} else if (!strcasecmp(input, "mouse")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = USE_MOUSE;
|
||||
#endif
|
||||
} else if (!strcasecmp(input, "noconvert")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = NO_CONVERT;
|
||||
} else if (!strcasecmp(input, "suspendenable")) {
|
||||
s->scfunc = do_toggle_void;
|
||||
s->toggle = SUSPEND;
|
||||
#endif /* !NANO_TINY */
|
||||
} else {
|
||||
free(s);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue