]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Make 'extend selection' mouse button work again.
authorSimon Tatham <anakin@pobox.com>
Mon, 28 Sep 2015 19:18:58 +0000 (20:18 +0100)
committerSimon Tatham <anakin@pobox.com>
Mon, 28 Sep 2015 19:18:58 +0000 (20:18 +0100)
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.

terminal.c

index fabfce1144707d824537153c00ebe16f755b52a1..ca47c8335f79eabaf581bd71b8b55f28b8718ee6 100644 (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