tavoid unnecessary winresize, which flush text cache - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 77c5c852e499362b4fdf7a636e541bab6d496130
parent cee7a6ab10235f764435f394d98b9c1e33b4eeb4
Author: rsc 
Date:   Thu, 12 Jan 2006 04:44:46 +0000

avoid unnecessary winresize, which flush text cache

Diffstat:
  M src/cmd/acme/wind.c                 |       7 +++++--

1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/cmd/acme/wind.c b/src/cmd/acme/wind.c
t@@ -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;
t@@ -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;
t@@ -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