addition ability from this builder function of the shortcut list.
* src/global.c (strtokeytype): Move this to a better place.
* src/global.c (first_sc_for): Move this too to a better place.
+ * src/prompt.c (do_yesno_prompt): Use the new and more direct
+ func_from_key() wrapper instead of get_shortcut().
2014-07-24 Jordi Mallach <jordi@gnu.org>
* doc/texinfo/nano.texi, doc/man/nanorc.5: Typo fix.
const char *yesstr; /* String of Yes characters accepted. */
const char *nostr; /* Same for No. */
const char *allstr; /* And All, surprise! */
- const sc *s;
int oldmenu = currmenu;
assert(msg != NULL);
do {
int kbinput;
+ functionptrtype func;
#ifndef DISABLE_MOUSE
int mouse_x, mouse_y;
#endif
currmenu = MYESNO;
kbinput = get_kbinput(bottomwin);
- s = get_shortcut(&kbinput);
+ func = func_from_key(&kbinput);
- if (s && s->scfunc == do_cancel)
+ if (func == do_cancel)
ok = -1;
#ifndef DISABLE_MOUSE
else if (kbinput == KEY_MOUSE) {
}
}
#endif /* !DISABLE_MOUSE */
- else if (s && s->scfunc == total_refresh) {
+ else if (func == total_refresh) {
total_redraw();
continue;
} else {