diff options
-rw-r--r-- | src/cmd/acme/mail/mail.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cmd/acme/mail/mail.c b/src/cmd/acme/mail/mail.c index 8f165fe1..c61f0c12 100644 --- a/src/cmd/acme/mail/mail.c +++ b/src/cmd/acme/mail/mail.c @@ -233,6 +233,7 @@ threadmain(int argc, char *argv[]) proccreate(plumbproc, nil, STACK); proccreate(plumbshowproc, nil, STACK); threadcreate(plumbshowthread, nil, STACK); + fswrite(mbox.ctlfd, "refresh", 7); /* ... and use this thread to read the messages */ plumbthread(); } @@ -441,6 +442,25 @@ mboxcommand(Window *w, char *s) rewritembox(wbox, &mbox); return 1; } + if(strcmp(s, "Get") == 0){ + if(mbox.dirty){ + mbox.dirty = 0; + fprint(2, "mail: mailbox not written\n"); + return 1; + } + winsetaddr(w, ",", 1); + if(w->data == nil) + w->data = winopenfile(w, "data"); + fswrite(w->data, "", 0); + mesgmenu(wbox, &mbox); + winclean(wbox); + fswrite(mbox.ctlfd, "refresh", 7); + return 1; + } + if(strcmp(s, "Refresh") == 0){ + fswrite(mbox.ctlfd, "refresh", 7); + return 1; + } if(strcmp(s, "Delmesg") == 0){ save = nil; if(nargs > 1) |