From 3568348260054100d4ec66dd3d4d7dbb55bd9dd5 Mon Sep 17 00:00:00 2001 From: Alex Musolino Date: Sat, 5 Jun 2021 01:21:55 +0930 Subject: 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. --- sys/src/cmd/upas/Mail/mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/cmd/upas/Mail/mbox.c b/sys/src/cmd/upas/Mail/mbox.c index 97742e379..ccb8d3e39 100644 --- a/sys/src/cmd/upas/Mail/mbox.c +++ b/sys/src/cmd/upas/Mail/mbox.c @@ -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)) -- cgit v1.2.3