From a9bbe7f9f1281df9cc97567582603041e250e4ab Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Mon, 24 Oct 2016 18:48:38 -0400 Subject: [PATCH] Fixed a bug where successive right clicks erroneously expand search selection --- mouse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mouse.c b/mouse.c index 63af136..1cceaa4 100644 --- a/mouse.c +++ b/mouse.c @@ -48,8 +48,8 @@ void selection(MouseEvent* mevnt) { } void search(MouseEvent* mevnt) { - unsigned clickpos = screen_getoff(&Buffer, DotEnd, mevnt->y, mevnt->x); - if (DotBeg == DotEnd || clickpos < DotBeg || clickpos > DotEnd) { + unsigned clickpos = screen_getoff(&Buffer, DotEnd, mevnt->y-1, mevnt->x); + if (clickpos < DotBeg || clickpos > DotEnd) { move_cursor(mevnt); selection(mevnt); } @@ -96,8 +96,8 @@ void (*Actions[5][3])(MouseEvent* mevnt) = { }, [MOUSE_RIGHT] = { [SINGLE_CLICK] = search, - [DOUBLE_CLICK] = unused, - [TRIPLE_CLICK] = unused, + [DOUBLE_CLICK] = search, + [TRIPLE_CLICK] = search, }, [MOUSE_WHEELUP] = { [SINGLE_CLICK] = scrollup, -- 2.49.0