diff options
author | rsc <devnull@localhost> | 2006-01-12 04:44:46 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-01-12 04:44:46 +0000 |
commit | 77c5c852e499362b4fdf7a636e541bab6d496130 (patch) | |
tree | ae6149dd1472eeba73b3aa0b483be009d2cb0b7e /src | |
parent | cee7a6ab10235f764435f394d98b9c1e33b4eeb4 (diff) | |
download | plan9port-77c5c852e499362b4fdf7a636e541bab6d496130.tar.gz plan9port-77c5c852e499362b4fdf7a636e541bab6d496130.tar.bz2 plan9port-77c5c852e499362b4fdf7a636e541bab6d496130.zip |
avoid unnecessary winresize, which flush text cache
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/acme/wind.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmd/acme/wind.c b/src/cmd/acme/wind.c index 36aa9985..762fb9d0 100644 --- a/src/cmd/acme/wind.c +++ b/src/cmd/acme/wind.c @@ -387,7 +387,7 @@ wincleartag(Window *w) void winsettag1(Window *w) { - int bar, dirty, i, j, k, n, ntagname; + int bar, dirty, i, j, k, n, ntagname, resize; Rune *new, *old, *r, *tagname; Image *b; uint q0, q1; @@ -482,7 +482,9 @@ winsettag1(Window *w) assert(i==runestrlen(new)); /* replace tag if the new one is different */ + resize = 0; if(runeeq(new, i, old, k) == FALSE){ + resize = 1; n = k; if(n > i) n = i; @@ -521,7 +523,8 @@ winsettag1(Window *w) 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); - winresize(w, w->r, TRUE, TRUE); + if(resize) + winresize(w, w->r, TRUE, TRUE); } void |