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

This commit is contained in:
Ori Bernstein 2020-05-07 13:23:15 -07:00
parent 6d25e194e2
commit ec4011acf7

View file

@ -928,9 +928,9 @@ textselect(Text *t)
b = mouse->buttons; b = mouse->buttons;
q0 = t->q0; q0 = t->q0;
q1 = t->q1; q1 = t->q1;
dx = abs(clickpt.x - w->mc.xy.x); dx = abs(clickpt.x - mouse->xy.x);
dy = abs(clickpt.y - w->mc.xy.y); dy = abs(clickpt.y - mouse->xy.y);
clickpt = w->mc.xy; clickpt = mouse->xy;
selectq = t->org+frcharofpt(t, mouse->xy); selectq = t->org+frcharofpt(t, mouse->xy);
clickcount++; clickcount++;
if(mouse->msec-clickmsec >= 500 || selecttext != t || clickcount > 3 || dx > 3 || dy > 3) if(mouse->msec-clickmsec >= 500 || selecttext != t || clickcount > 3 || dx > 3 || dy > 3)