From a3f421ca2b758e7f366f2da3bb3f1d535b876fa4 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 11 Jun 2014 18:04:36 +0000 Subject: [PATCH] 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 --- ChangeLog | 8 ++++++++ src/nano.c | 2 +- src/winio.c | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 53b430cc..120f4330 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2014-06-11 Benno Schulenberg + * 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 * src/browser.c, src/files.c, src/nano.c src/prompt.c, src/winio.c: A few minimalistic whitespace adjustments. diff --git a/src/nano.c b/src/nano.c index 2c2a8547..58aaf45f 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1595,7 +1595,7 @@ int do_input(bool *meta_key, bool *func_key, bool allow_funcs) else { *meta_key = FALSE; *func_key = FALSE; - input = ERR; + return ERR; } } } diff --git a/src/winio.c b/src/winio.c index 934fec9e..371080ef 100644 --- a/src/winio.c +++ b/src/winio.c @@ -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); unget_kbinput(s->seq, s->type == META, FALSE); } + return 1; } else /* Handle releases/clicks of the first mouse button that * aren't on the current shortcut list elsewhere. */ -- 2.39.5