diff --git a/sys/src/libdraw/eenter.c b/sys/src/libdraw/eenter.c index 6d5d70239..0e08a5d70 100644 --- a/sys/src/libdraw/eenter.c +++ b/sys/src/libdraw/eenter.c @@ -143,7 +143,7 @@ nodraw: } if(k == Kleft){ for(i = 0; i < n; i += l){ - l = chartorune(&k, buf+tick); + l = chartorune(&k, buf+i); if(i+l >= tick){ tick = i; break; diff --git a/sys/src/libdraw/enter.c b/sys/src/libdraw/enter.c index 4f0b6b6bf..cbcc52573 100644 --- a/sys/src/libdraw/enter.c +++ b/sys/src/libdraw/enter.c @@ -151,7 +151,7 @@ nodraw: } if(k == Kleft){ for(i = 0; i < n; i += l){ - l = chartorune(&k, buf+tick); + l = chartorune(&k, buf+i); if(i+l >= tick){ tick = i; break;