]> git.lizzy.rs Git - plan9front.git/commitdiff
upas/Mail: fix bug where Redraw must be executed twice to have an effect
authorAlex Musolino <alex@musolino.id.au>
Fri, 4 Jun 2021 15:51:55 +0000 (01:21 +0930)
committerAlex Musolino <alex@musolino.id.au>
Fri, 4 Jun 2021 15:51:55 +0000 (01:21 +0930)
In showlist, call bwindata instead of bwinopen in order to use a
pre-existing fd to write to the data file.  This existing fd will
properly honour any address set by a previous write to the addr file.
Specifically, the redraw function sets addr to "," before calling
showlist in order to overwrite the entire contents of the window.

sys/src/cmd/upas/Mail/mbox.c

index 97742e3792b3344f41a25f4d478d297f91e81ff8..ccb8d3e39592e041cc6fe9f32691d95d4b18815e 100644 (file)
@@ -746,7 +746,7 @@ showlist(void)
        Mesg *m;
        int i;
 
-       bfd = bwinopen(&mbox, "data", OWRITE);
+       bfd = bwindata(&mbox, OWRITE);
        for(i = 0; i < mbox.nmesg; i++){
                m = mbox.mesg[i];
                if(mbox.view == Vflat || m->state & (Sdummy|Stoplev))