ref: 0182cc9db88b4da0a15ad6ee407fa03a3f3ce5b1
parent: ebf2c5cd6997eb7a200ff7d79734ff0dfd43a748
author: cinap_lenrek <[email protected]>
date: Sat Sep 7 16:07:00 EDT 2013
acme: avoid useless tagline/window redraw if not needed window resize is only neccesary if tagline changed.
--- a/sys/src/cmd/acme/wind.c
+++ b/sys/src/cmd/acme/wind.c
@@ -387,6 +387,8 @@
int i;
texttype(t, r);
+ if(t->what == Tag)
+ w->tagsafe = FALSE;
if(t->what == Body)
for(i=0; i<t->file->ntext; i++)
textscrdraw(t->file->text[i]);
@@ -447,6 +449,7 @@
old = runemalloc(w->tag.file->nc+1);
bufread(w->tag.file, 0, old, w->tag.file->nc);
old[w->tag.file->nc] = '\0';
+ w->tagsafe = FALSE;
}
new = runemalloc(w->body.file->nname+100);
i = 0;
@@ -509,6 +512,7 @@
w->tag.q1 = q1+bar;
}
}
+ w->tagsafe = FALSE;
}
free(old);
free(new);
@@ -526,9 +530,8 @@
br.max.x = br.min.x + Dx(b->r);
br.max.y = br.min.y + Dy(b->r);
draw(screen, br, b, nil, b->r.min);
-
- w->tagsafe = 0;
- winresize(w, w->r, TRUE);
+ if(w->tagsafe == FALSE)
+ winresize(w, w->r, TRUE);
}
void