From: Benno Schulenberg Date: Wed, 11 Jun 2014 18:23:29 +0000 (+0000) Subject: Always accepting mouse events, also when just looking for Unjustify. X-Git-Tag: v2.3.5~103 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=fc35e200529bb77402f0d2f1ffa7b9407b955c95;p=nano.git Always accepting mouse events, also when just looking for Unjustify. This fixes Savannah bug #42322. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4957 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 120f4330..7cc43237 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ mouse event (a touch of the touchpad, for example) but get out. Continuing would result in the cutbuffer being cleared upon the next cut. These two changes together fix Savannah bug #42326. + * src/nano.c (do_input): Always accept mouse events, also when + just looking for Unjustify. This fixes Savannah bug #42322. 2014-06-10 Benno Schulenberg * src/browser.c, src/files.c, src/nano.c src/prompt.c, src/winio.c: diff --git a/src/nano.c b/src/nano.c index 58aaf45f..704c61e1 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1586,18 +1586,13 @@ int do_input(bool *meta_key, bool *func_key, bool allow_funcs) input = get_kbinput(edit, meta_key, func_key); #ifndef DISABLE_MOUSE - if (allow_funcs) { - /* If we got a mouse click and it was on a shortcut, read in the - * shortcut character. */ - if (*func_key && input == KEY_MOUSE) { - if (do_mouse() == 1) - input = get_kbinput(edit, meta_key, func_key); - else { - *meta_key = FALSE; - *func_key = FALSE; - return ERR; - } - } + if (*func_key && input == KEY_MOUSE) { + /* We received a mouse click -- if it was on a shortcut, read in + * the produced shortcut character, otherwise get out. */ + if (do_mouse() == 1) + input = get_kbinput(edit, meta_key, func_key); + else + return ERR; } #endif