shithub: riscv

Download patch

ref: ec4011acf78e176c226d69d355c3996dc3a1062c
parent: 6d25e194e2160a6ed8b2a7e399fff90e2215ff3c
author: Ori Bernstein <ori@eigenstate.org>
date: Thu May 7 09:23:15 EDT 2020

fix typo: mouse->xy, not w->mc.xy

--- a/sys/src/cmd/acme/text.c
+++ b/sys/src/cmd/acme/text.c
@@ -928,9 +928,9 @@
 	b = mouse->buttons;
 	q0 = t->q0;
 	q1 = t->q1;
-	dx = abs(clickpt.x - w->mc.xy.x);
-	dy = abs(clickpt.y - w->mc.xy.y);
-	clickpt = w->mc.xy;
+	dx = abs(clickpt.x - mouse->xy.x);
+	dy = abs(clickpt.y - mouse->xy.y);
+	clickpt = mouse->xy;
 	selectq = t->org+frcharofpt(t, mouse->xy);
 	clickcount++;
 	if(mouse->msec-clickmsec >= 500 || selecttext != t || clickcount > 3 || dx > 3 || dy > 3)