git: 9front

Download patch

ref: 67ea0e0d70e735cfc86e3e82a37e3a911fe243e6
parent: cd3bcc57ca09f61fe11d87a0c3e3a45f3ac5212f
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Sun Sep 23 08:11:21 EDT 2012

mothra: dont highlight subpanels in textview

--- a/sys/src/cmd/mothra/libpanel/rtext.c
+++ b/sys/src/cmd/mothra/libpanel/rtext.c
@@ -182,16 +182,19 @@
 			if(t->b){
 				draw(b, insetrect(dr, BORD), t->b, 0, t->b->r.min);
 				if(t->flags&PL_HOT) border(b, dr, 1, display->black, ZP);
+				if(t->flags&PL_SEL)
+					pl_highlight(b, dr);
 			}
 			else if(t->p){
 				plmove(t->p, subpt(dr.min, t->p->r.min));
 				pldraw(t->p, b);
-
 				if(b != bb)
 					pl_stuffbitmap(t->p, bb);
 			}
 			else{
 				string(b, dr.min, display->black, ZP, t->font, t->text);
+				if(t->flags&PL_SEL)
+					pl_highlight(b, dr);
 				if(t->flags&PL_HOT){
 					if(lp.y+1 != dr.max.y)
 						lp = Pt(dr.min.x, dr.max.y-1);
@@ -199,13 +202,10 @@
 						Endsquare, Endsquare, 0,
 						display->black, ZP);
 					lp = Pt(dr.max.x, dr.max.y-1);
-					goto Cont;
+					continue;
 				}
 			}
 			lp=ZP;
-		Cont:
-			if(t->flags&PL_SEL)
-				pl_highlight(b, dr);
 		}
 	}
 
--