From 4adb1d68d1a958c2ee3c5cfe2e26968e13dcfc1b Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Sat, 25 Apr 2020 11:00:27 -0700 Subject: fix typos in time calculation the results of the time calculation were garbled -- and apparently negative on my system when testing, so the test passed when it shouldn't have. --- sys/src/cmd/samterm/flayer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/src/cmd/samterm/flayer.c b/sys/src/cmd/samterm/flayer.c index 101effb6e..944fee699 100644 --- a/sys/src/cmd/samterm/flayer.c +++ b/sys/src/cmd/samterm/flayer.c @@ -258,7 +258,7 @@ flselect(Flayer *l) if(l->visible!=All) flupfront(l); - dt = l->click = mousep->msec; + dt = mousep->msec - l->click; dx = abs(mousep->xy.x - clickpt.x); dy = abs(mousep->xy.y - clickpt.y); @@ -279,7 +279,6 @@ flsetselect(Flayer *l, long p0, long p1) { ulong fp0, fp1; - l->click = 0; if(l->visible==None || !flprepare(l)){ l->p0 = p0, l->p1 = p1; return; -- cgit v1.2.3