Commit 5031ddf8 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

don't display "Unknown Command" after a mouse click

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3611 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 8f07329d
Showing with 18 additions and 6 deletions
+18 -6
......@@ -1267,9 +1267,15 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
if (allow_funcs) {
/* If we got a mouse click and it was on a shortcut, read in the
* shortcut character. */
if (*func_key == TRUE && input == KEY_MOUSE)
input = do_mouse() ? get_kbinput(edit, meta_key, func_key) :
ERR;
if (*func_key == TRUE && input == KEY_MOUSE) {
if (do_mouse())
input = get_kbinput(edit, meta_key, func_key);
else {
*meta_key = FALSE;
*func_key = FALSE;
input = ERR;
}
}
}
#endif
......
......@@ -71,9 +71,15 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
if (allow_funcs) {
/* If we got a mouse click and it was on a shortcut, read in the
* shortcut character. */
if (*func_key == TRUE && input == KEY_MOUSE)
input = do_statusbar_mouse() ? get_kbinput(bottomwin,
meta_key, func_key) : ERR;
if (*func_key == TRUE && input == KEY_MOUSE) {
if (do_statusbar_mouse())
input = get_kbinput(bottomwin, meta_key, func_key);
else {
*meta_key = FALSE;
*func_key = FALSE;
input = ERR;
}
}
}
#endif
......
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