Producing the correct return value for when a mouse event reinserted something

into the keyboard buffer.  And not continuing but getting out when there is a
spurious  mouse event.  Continuing would result in the cutbuffer being cleared
upon the next cut.  These two changes together fix Savannah bug #42326.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4956 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-06-11 18:04:36 +00:00
parent 7d5f42ca08
commit a3f421ca2b
3 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2014-06-11 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (get_mouseinput): Produce the correct return value for
when a mouse event reinserted something into the keyboard buffer.
* src/nano.c (do_input): Do not continue when there is a spurious
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.
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:
A few minimalistic whitespace adjustments. A few minimalistic whitespace adjustments.

View File

@ -1595,7 +1595,7 @@ int do_input(bool *meta_key, bool *func_key, bool allow_funcs)
else { else {
*meta_key = FALSE; *meta_key = FALSE;
*func_key = FALSE; *func_key = FALSE;
input = ERR; return ERR;
} }
} }
} }

View File

@ -1718,6 +1718,7 @@ int get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts)
const sc *s = first_sc_for(currmenu, f->scfunc); const sc *s = first_sc_for(currmenu, f->scfunc);
unget_kbinput(s->seq, s->type == META, FALSE); unget_kbinput(s->seq, s->type == META, FALSE);
} }
return 1;
} else } else
/* Handle releases/clicks of the first mouse button that /* Handle releases/clicks of the first mouse button that
* aren't on the current shortcut list elsewhere. */ * aren't on the current shortcut list elsewhere. */