Commit 1147aed6 authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Handle reopen/new_mail when closing mailbox in <imap-logout-all>.

Other callers, such as OP_QUIT, OP_MAIN_CHANGE_FOLDER, and
OP_MAIN_SYNC_FOLDER handle the case where a sync or close_mailbox
fails due to new mail or a reopen.

OP_MAIN_LOGOUT_ALL appears to have been accidentally missed.  Add a
call to update_index() to properly sort and update vcounts.
parent 2030998e
......@@ -1159,8 +1159,12 @@ int mutt_index_menu (void)
case OP_MAIN_IMAP_LOGOUT_ALL:
if (Context && Context->magic == MUTT_IMAP)
{
if (mx_close_mailbox (Context, &index_hint) != 0)
int check;
if ((check = mx_close_mailbox (Context, &index_hint)) != 0)
{
if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED)
update_index (menu, Context, check, oldcount, index_hint);
set_option (OPTSEARCHINVALID);
menu->redraw = REDRAW_FULL;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment