tweaks: elide an unneeded variable
A shortcut's function must be among the existing ones, otherwise nano's code is fundamentally broken.master
parent
65bf04060b
commit
53a10ddcaf
|
@ -64,7 +64,6 @@ int do_statusbar_input(bool *finished)
|
||||||
static size_t kbinput_len = 0;
|
static size_t kbinput_len = 0;
|
||||||
/* The length of the input buffer. */
|
/* The length of the input buffer. */
|
||||||
const sc *shortcut;
|
const sc *shortcut;
|
||||||
const subnfunc *f;
|
|
||||||
|
|
||||||
*finished = FALSE;
|
*finished = FALSE;
|
||||||
|
|
||||||
|
@ -168,8 +167,7 @@ int do_statusbar_input(bool *finished)
|
||||||
/* Handle any other shortcut in the current menu, setting finished
|
/* Handle any other shortcut in the current menu, setting finished
|
||||||
* to TRUE to indicate that we're done after running or trying to
|
* to TRUE to indicate that we're done after running or trying to
|
||||||
* run its associated function. */
|
* run its associated function. */
|
||||||
f = sctofunc(shortcut);
|
if (!ISSET(VIEW_MODE) || sctofunc(shortcut)->viewok)
|
||||||
if (f && (!ISSET(VIEW_MODE) || f->viewok))
|
|
||||||
execute(shortcut);
|
execute(shortcut);
|
||||||
*finished = TRUE;
|
*finished = TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue