shithub: riscv

Download patch

ref: 74cdf2c10a6c23147c348a4d87fb548f58acc5c2
parent: bd998b2a78e32af7a2a8cf39ee8c11bbb3cd12ca
author: cinap_lenrek <[email protected]>
date: Sat Sep 22 23:48:29 EDT 2012

mothra: cleanup textview code

--- a/sys/src/cmd/mothra/libpanel/textview.c
+++ b/sys/src/cmd/mothra/libpanel/textview.c
@@ -39,10 +39,7 @@
 		if(rp->b==0 && rp->p!=0)
 			pl_stuffbitmap(rp->p, b);
 }
-/*
- * Mark the hilite and update the scroll bar
- */
-void pl_fixtextview(Panel *p, Textview *tp, Rectangle r){
+void pl_setscrpos(Panel *p, Textview *tp, Rectangle r){
 	Panel *sb;
 	int lo, hi;
 	lo=tp->yoffs;
@@ -72,7 +69,7 @@
 		freeimage(b);
 		pl_drawnon(tp->text, p->b);
 	}
-	pl_fixtextview(p, tp, r);
+	pl_setscrpos(p, tp, r);
 }
 /*
  * If t is a panel word, pass the mouse event on to it
@@ -161,7 +158,7 @@
 		r=pl_outline(p->b, p->r, p->state);
 		pl_rtredraw(p->b, r, tp->text, yoffs, tp->yoffs);
 		p->scr.pos.y=tp->yoffs=yoffs;
-		pl_fixtextview(p, tp, r);
+		pl_setscrpos(p, tp, r);
 	}
 }
 void pl_typetextview(Panel *g, Rune c){