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

james palmer 2021-05-13 21:29:19 +01:00
parent 15b903c4e1
commit 9633c9fc65
1 changed files with 2 additions and 5 deletions

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;