1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Make 'extend selection' mouse button work again.

I broke it as a side effect of commit 30e63c105, in which I intended
to ignore mouse drag events that hadn't been preceded by a click. I
didn't spot that right-clicks (assuming Unix-style button mappings) go
through the same code path as left-drags, and hence were being ignored
even though they _were_ their own initiating click.
This commit is contained in:
Simon Tatham 2015-09-28 20:18:58 +01:00
parent 675a5baa0f
commit df006f36ce

View File

@ -6078,7 +6078,8 @@ void term_mouse(Terminal *term, Mouse_Button braw, Mouse_Button bcooked,
sel_spread(term);
} else if ((bcooked == MBT_SELECT && a == MA_DRAG) ||
(bcooked == MBT_EXTEND && a != MA_RELEASE)) {
if (term->selstate == NO_SELECTION || term->selstate == SELECTED) {
if (a == MA_DRAG &&
(term->selstate == NO_SELECTION || term->selstate == SELECTED)) {
/*
* This can happen if a front end has passed us a MA_DRAG
* without a prior MA_CLICK. OS X GTK does so, for