From e0bfd148e29346f9fb824ea0c6ac86b5870836ce Mon Sep 17 00:00:00 2001 From: Sigrid Date: Thu, 4 Feb 2021 10:45:52 +0100 Subject: [PATCH] libdraw: enter/eenter: fix Kleft for non-ascii text --- sys/src/libdraw/eenter.c | 2 +- sys/src/libdraw/enter.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;