From: Michael D. Lowis Date: Mon, 24 Oct 2016 22:48:38 +0000 (-0400) Subject: Fixed a bug where successive right clicks erroneously expand search selection X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=a9bbe7f9f1281df9cc97567582603041e250e4ab;p=projs%2Ftide.git Fixed a bug where successive right clicks erroneously expand search selection --- 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,