aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-05-02 04:30:54 +0000
committerrsc <devnull@localhost>2005-05-02 04:30:54 +0000
commit033c6013b27ae5f3eb33a8af7c18e5c664ac8e8c (patch)
tree7ffec45e578d51f0631b76a86223df22bc0e8745 /src
parent7e9e092da8d0c91c8075d9f0a4b1700de8f46753 (diff)
downloadplan9port-033c6013b27ae5f3eb33a8af7c18e5c664ac8e8c.tar.gz
plan9port-033c6013b27ae5f3eb33a8af7c18e5c664ac8e8c.tar.bz2
plan9port-033c6013b27ae5f3eb33a8af7c18e5c664ac8e8c.zip
fix row dump/load inconsistency - thanks to peter canning
Diffstat (limited to 'src')
-rw-r--r--src/cmd/acme/rows.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/cmd/acme/rows.c b/src/cmd/acme/rows.c
index caaab9d4..85799f0b 100644
--- a/src/cmd/acme/rows.c
+++ b/src/cmd/acme/rows.c
@@ -74,7 +74,7 @@ rowadd(Row *row, Column *c, int x)
return nil;
draw(screen, r, display->white, nil, ZP);
r1 = r;
- r1.max.x = min(x, r.max.x-50);
+ r1.max.x = min(x-Border, r.max.x-50);
if(Dx(r1) < 50)
r1.max.x = r1.min.x+50;
colresize(d, r1);
@@ -551,15 +551,17 @@ rowload(Row *row, char *file, int initing)
c2 = row->col[i];
r1 = c1->r;
r2 = c2->r;
- r1.max.x = x;
- r2.min.x = x+Border;
+ if(x<Border)
+ x = Border;
+ r1.max.x = x-Border;
+ r2.min.x = x;
if(Dx(r1) < 50 || Dx(r2) < 50)
continue;
draw(screen, Rpt(r1.min, r2.max), display->white, nil, ZP);
colresize(c1, r1);
colresize(c2, r2);
- r2.min.x = x;
- r2.max.x = x+Border;
+ r2.min.x = x-Border;
+ r2.max.x = x;
draw(screen, r2, display->black, nil, ZP);
}
if(i >= row->ncol)