#2949: Off-by-one bug in imap_complete_hosts I discovered a bug in the IMAP folder completion, which caused that the last IMAP folder in mailboxes was never proposed for completion.
How to reproduce it: Put something like this in `.muttrc`: {{{ mailboxes "imap://aaa" mailboxes "imap://bbb" mailboxes "imap://ccc" }}} Lauch Mutt and press `c`. At the prompt type `imap://a` and press `<TAB>`, this completes to `imap://aaa/`.[[BR]] Delete everything and type `imap://b` and press `<TAB>`, this completes to `imap://bbb/`.[[BR]] Delete everything and type `imap://c` and press `<TAB>`, this does not complete to anything but it should complete to `imap://ccc/`. The attached patch fixes this bug (wrong loop-test in a for-loop). -- Ticket URL: <http://dev.mutt.org/trac/ticket/2949>