~mcf/plan9front

df21fb75e51e62830f9951e18b5166b2c2b15438 — james palmer 5 months ago 91de99b
libpanel: fix text sliding around in libpanel text entry widgets.
1 files changed, 2 insertions(+), 5 deletions(-)

M sys/src/cmd/mothra/libpanel/entry.c
M sys/src/cmd/mothra/libpanel/entry.c => sys/src/cmd/mothra/libpanel/entry.c +2 -5
@@ 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;