commit a3f421ca2b758e7f366f2da3bb3f1d535b876fa4
parent 7d5f42ca080b5a087c19c9c5b5d54b402fb393a1
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 11 Jun 2014 18:04:36 +0000
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
Diffstat:
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -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>
* 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
@@ -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
@@ -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. */