tfix tags again - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit d76a49fb4394c8a70de2480ef25bca2ac3aa2329
 (DIR) parent fb04a0b942408b516d2ac11e57b20960520de7ed
 (HTM) Author: rsc <devnull@localhost>
       Date:   Fri, 16 Mar 2007 03:28:46 +0000
       
       fix tags again
       
       Diffstat:
         M src/cmd/acme/wind.c                 |      17 +++--------------
       
       1 file changed, 3 insertions(+), 14 deletions(-)
       ---
 (DIR) diff --git a/src/cmd/acme/wind.c b/src/cmd/acme/wind.c
       t@@ -118,26 +118,15 @@ wintaglines(Window *w, Rectangle r)
        {
                int n;
                Rune rune;
       -        Rectangle all, scrollr;
        
        /* TAG policy here */
        
                if(!w->tagexpand)
                        return 1;
                w->tag.fr.noredraw = 1;
       -        /*
       -         * clumsy: since we are calling textresize but
       -         * not redrawing, we need to leave all and
       -         * scrollr unchanged, so that the computation
       -         * in winresize will decide to redraw the tag
       -         * when the rectangle does move.
       -         */
       -        all = w->tag.all;
       -        scrollr = w->tag.scrollr;
                textresize(&w->tag, r, TRUE);
       -        w->tag.all = all;
       -        w->tag.scrollr = scrollr;
                w->tag.fr.noredraw = 0;
       +        w->tagsafe = FALSE;
                
                /* can't use more than we have */
                if(w->tag.fr.nlines >= w->tag.fr.maxlines)
       t@@ -176,7 +165,6 @@ if(0) fprint(2, "winresize %d %R safe=%d keep=%d h=%d\n", w->id, r, safe, keepex
                if(!safe || !w->tagsafe || !eqrect(w->tag.all, r1)){
        
                        w->taglines = wintaglines(w, r);
       -                w->tagsafe = TRUE;
                }
        /* END TAG */
        
       t@@ -185,13 +173,14 @@ if(0) fprint(2, "winresize %d %R safe=%d keep=%d h=%d\n", w->id, r, safe, keepex
                y = r1.max.y;
                tagresized = 0;
        if(0) fprint(2, "winresize tag %R %R\n", w->tag.all, r1);
       -        if(!safe || !eqrect(w->tag.all, r1)){
       +        if(!safe || !w->tagsafe || !eqrect(w->tag.all, r1)){
                        tagresized = 1;
        if(0) fprint(2, "resize tag %R => %R\n", w->tag.all, r1);
                        textresize(&w->tag, r1, TRUE);
        if(0) fprint(2, "=> %R (%R)\n", w->tag.all, w->tag.fr.r);
                        y = w->tag.fr.r.max.y;
                        windrawbutton(w);
       +                w->tagsafe = TRUE;
        /* TAG */
                        if(mouseintag && !ptinrect(mouse->xy, w->tag.all)){
                                p = mouse->xy;