Ticket #2949 (closed defect: fixed)

Opened 15 months ago

Last modified 15 months ago

Off-by-one bug in imap_complete_hosts

Reported by: x-way Owned by: mutt-dev
Priority: trivial Milestone:
Component: mutt Version: 1.5.16
Keywords: Cc:

Description

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/.
Delete everything and type imap://b and press <TAB>, this completes to imap://bbb/.
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).

Attachments

mutt-1.5.16-imap_complete_hosts.patch (458 bytes) - added by x-way 15 months ago.

Change History

Changed 15 months ago by x-way

Changed 15 months ago by Andreas Jaggi

  • status changed from new to closed
  • resolution set to fixed

(In [4e9445a06369]) Let imap_complete_hosts work with the last mailbox (closes #2949). This was an off-by-one error in the mailbox loop.

Note: See TracTickets for help on using tickets.