ref: 3568348260054100d4ec66dd3d4d7dbb55bd9dd5
parent: c036d803a1e94fd3a266bd37a786394dab3b8f90
author: Alex Musolino <alex@musolino.id.au>
date: Fri Jun 4 21:21:55 EDT 2021
upas/Mail: fix bug where Redraw must be executed twice to have an effect 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.
--- a/sys/src/cmd/upas/Mail/mbox.c
+++ b/sys/src/cmd/upas/Mail/mbox.c
@@ -746,7 +746,7 @@
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))