refresh on i, y commands

This commit is contained in:
rsc 2007-06-23 06:30:41 +00:00
parent e4ad2971d7
commit de7b2cd774

View file

@ -1743,8 +1743,16 @@ Message*
icmd(Cmd *x, Message *m) icmd(Cmd *x, Message *m)
{ {
int n; int n;
char buf[1024];
CFid *fd;
USED(x); USED(x);
snprint(buf, sizeof buf, "%s/ctl", mbname);
fd = fsopen(mailfs, buf, OWRITE);
if(fd){
fswrite(fd, "refresh", 7);
fsclose(fd);
}
n = dir2message(&top, reverse); n = dir2message(&top, reverse);
if(n > 0) if(n > 0)
Bprint(&out, "%d new message%s\n", n, plural(n)); Bprint(&out, "%d new message%s\n", n, plural(n));