]> granicus.if.org Git - neomutt/commit
Move LSUB call from connection establishment to mailbox SELECTion (#1232)
authorPietro Cerutti <gahr@gahr.ch>
Mon, 28 May 2018 12:42:30 +0000 (13:42 +0100)
committerGitHub <noreply@github.com>
Mon, 28 May 2018 12:42:30 +0000 (13:42 +0100)
commitba2d65541db70fe3ec53fa1d7c66347820e22b39
treee3b5fd52af80ca900ae9592af32fd603954621cd
parentf2f7c020778f0d36f3c3da959e84011b5c39519d
Move LSUB call from connection establishment to mailbox SELECTion (#1232)

* Move LSUB call from connection establishment to mailbox SELECTion

This changes the place where an LSUB is issued to an IMAP server in
order to populate the buffy list, when imap_check_subscribed is set.

Previously, LSUB was issued when a connection to an IMAP server was
*first* established.  This caused the commands sequence

  ":unmailboxes *<enter><change-folder>imaps://foo.com<enter>"

to populate the buffy list when *first* opening a connection to foo.com,
but not on subsequent back-and-forth between IMAP servers.

The new code moves the LSUB call - and thus the population of the buffy
list - to just before a mailbox is selected.
This fixes the above-mentioned issue, at the cost of additional LSUB
calls when switching between mailboxes on the same server. Given that
the list of subscribed mailboxes is expected to be in the tens, I think
this is a reasonable tradeoff.

Issue #1225
imap/imap.c
init.h