From df006f36ce0527a8b38814fadd4129c604cec09a Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 28 Sep 2015 20:18:58 +0100 Subject: [PATCH] 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. --- terminal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/terminal.c b/terminal.c index fabfce11..ca47c833 100644 --- a/terminal.c +++ b/terminal.c @@ -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