libpanel: fix text sliding around in libpanel text entry widgets.

This commit is contained in:
james palmer 2021-05-13 21:29:19 +01:00
parent 15b903c4e1
commit 9633c9fc65

View file

@ -64,13 +64,10 @@ static void drawentry(Panel *p, Rectangle r, Rune *s){
ep = p->data;
b = p->b;
if(Dx(r) != Dx(ep->lastr)){
ep->text = r.min;
ep->lastr = r;
}
ep->text = r.min;
ep->lastr = r;
tick = ep->text;
tick.x += runestringnwidth(font, s, ep->a);
if(plkbfocus == p)
r.max.x -= TICKW;
ep->text.y = r.min.y;