Using the more direct func_from_key() wrapper instead of get_shortcut().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5082 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
dbb5e7cd8e
commit
266e0496ab
|
@ -3,6 +3,8 @@
|
|||
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.
|
||||
|
|
|
@ -1045,7 +1045,6 @@ int do_yesno_prompt(bool all, const char *msg)
|
|||
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);
|
||||
|
@ -1106,15 +1105,16 @@ int do_yesno_prompt(bool all, const char *msg)
|
|||
|
||||
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) {
|
||||
|
@ -1146,7 +1146,7 @@ int do_yesno_prompt(bool all, const char *msg)
|
|||
}
|
||||
}
|
||||
#endif /* !DISABLE_MOUSE */
|
||||
else if (s && s->scfunc == total_refresh) {
|
||||
else if (func == total_refresh) {
|
||||
total_redraw();
|
||||
continue;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue