From: David Lawrence Ramsey Date: Fri, 2 Jun 2006 03:09:27 +0000 (+0000) Subject: don't display "Unknown Command" after a mouse click X-Git-Tag: v1.3.12~69 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5031ddf8eaf531730791204ea5ed3a0df93e137a;p=nano.git 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 --- diff --git a/src/nano.c b/src/nano.c index 6a0aeb31..dca1c63d 100644 --- a/src/nano.c +++ b/src/nano.c @@ -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 diff --git a/src/prompt.c b/src/prompt.c index e9540c7c..f75f2b88 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -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