From 0b6f559ebca69f6ad8b73d376d08d77df27f11bb Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 8 Jul 2012 22:25:23 +0200 Subject: mothra: edit selection fix --- sys/src/cmd/mothra/libpanel/edit.c | 2 +- sys/src/cmd/mothra/libpanel/textwin.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/src/cmd/mothra/libpanel/edit.c b/sys/src/cmd/mothra/libpanel/edit.c index f4019fa9b..27bbf435f 100644 --- a/sys/src/cmd/mothra/libpanel/edit.c +++ b/sys/src/cmd/mothra/libpanel/edit.c @@ -106,7 +106,7 @@ void pl_snarfedit(Panel *p, int cut){ */ int pl_hitedit(Panel *p, Mouse *m){ Edit *ep; - if(m->buttons&7){ + if((m->buttons&7)==1){ ep=p->data; ep->t->b=p->b; twhilite(ep->t, ep->sel0, ep->sel1, 0); diff --git a/sys/src/cmd/mothra/libpanel/textwin.c b/sys/src/cmd/mothra/libpanel/textwin.c index d752a4496..01c8a3573 100644 --- a/sys/src/cmd/mothra/libpanel/textwin.c +++ b/sys/src/cmd/mothra/libpanel/textwin.c @@ -228,6 +228,7 @@ void twselect(Textwin *t, Mouse *m){ p1=addpt(p0, Pt(1, 0)); twhilite(t, sel0, sel1, 1); for(;;){ + flushimage(display, 1); *m=emouse(); if((m->buttons&7)!=1) break; newsel=twpt2rune(t, m->xy); -- cgit v1.2.3