ref: 4340dd1b2fbc9eed665dbf8d946aca34ed25be37
parent: 5ef9330b6f0e0320fb55cb93e2f22fe9956a24c9
parent: c5b2927250f2dea07747150687239bdc883100a2
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Apr 21 22:42:16 EDT 2017
merge
--- a/sys/src/cmd/vt/main.c
+++ b/sys/src/cmd/vt/main.c
@@ -314,7 +314,6 @@
int x, y, n;
uchar c, *ap, *cp;
Rune *rp;
- Point p;
/* draw background */
draw(screen, screen->r, bgcolor, nil, ZP);
@@ -329,8 +328,7 @@
c = bgcol(*ap, *cp);
for(n = 1; x+n <= xmax && bgcol(ap[n], cp[n]) == c; n++)
;
- p = pt(x, y);
- draw(screen, Rpt(p, addpt(p, ftsize)), colors[c>>1], nil, ZP);
+ draw(screen, Rpt(pt(x, y), pt(x+n, y+1)), colors[c>>1], nil, ZP);
}
}
@@ -372,11 +370,13 @@
void
clear(int x1, int y1, int x2, int y2)
{
+ int c = (attr & 0x0F00)>>8; /* bgcolor */
+
while(y1 < y2){
if(x1 < x2){
memset(onscreenr(x1, y1), 0, (x2-x1)*sizeof(Rune));
memset(onscreena(x1, y1), 0, x2-x1);
- memset(onscreenc(x1, y1), 0, x2-x1);
+ memset(onscreenc(x1, y1), c, x2-x1);
}
if(x2 > xmax)
*onscreenr(xmax+1, y1) = '\n';