commit 5031ddf8eaf531730791204ea5ed3a0df93e137a
parent 8f07329d00a02a8fd0bb16ad9f404e8feba07b3e
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Fri, 2 Jun 2006 03:09:27 +0000
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
Diffstat:
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git 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
@@ -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