Commit fc35e200 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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
parent a3f421ca
Showing with 9 additions and 12 deletions
+9 -12
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
mouse event (a touch of the touchpad, for example) but get out. mouse event (a touch of the touchpad, for example) but get out.
Continuing would result in the cutbuffer being cleared upon the Continuing would result in the cutbuffer being cleared upon the
next cut. These two changes together fix Savannah bug #42326. 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 <bensberg@justemail.net> 2014-06-10 Benno Schulenberg <bensberg@justemail.net>
* src/browser.c, src/files.c, src/nano.c src/prompt.c, src/winio.c: * src/browser.c, src/files.c, src/nano.c src/prompt.c, src/winio.c:
......
...@@ -1586,18 +1586,13 @@ int do_input(bool *meta_key, bool *func_key, bool allow_funcs) ...@@ -1586,18 +1586,13 @@ int do_input(bool *meta_key, bool *func_key, bool allow_funcs)
input = get_kbinput(edit, meta_key, func_key); input = get_kbinput(edit, meta_key, func_key);
#ifndef DISABLE_MOUSE #ifndef DISABLE_MOUSE
if (allow_funcs) { if (*func_key && input == KEY_MOUSE) {
/* If we got a mouse click and it was on a shortcut, read in the /* We received a mouse click -- if it was on a shortcut, read in
* shortcut character. */ * the produced shortcut character, otherwise get out. */
if (*func_key && input == KEY_MOUSE) { if (do_mouse() == 1)
if (do_mouse() == 1) input = get_kbinput(edit, meta_key, func_key);
input = get_kbinput(edit, meta_key, func_key); else
else { return ERR;
*meta_key = FALSE;
*func_key = FALSE;
return ERR;
}
}
} }
#endif #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