summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2022-02-21 12:19:30 -0800
committerKevin McCarthy <kevin@8t8.us>2022-02-21 15:35:54 -0800
commitbce2c294b27808f9373afa1ada61719f57d20e59 (patch)
tree1406615831bacb256e796b536f4699adeb645e17
parentc8109e1465d876473a007010ca116e6c67dedaec (diff)
Fix some mailbox prompts to use mailbox history ring.
Commit b0570d76, in the 2.0 release, improved some of the mailbox prompt flow and logic, creating a separate function for mailbox prompting. At the same time it changed "save/copy to mailbox" to use that function and thus the mailbox history ring. Unfortunately, this created a partition between some other prompts that used the filename history ring but were actually prompting for mailboxes. Change those prompts: edit-fcc, and imap create/rename mailbox to use the mailbox history ring. This will allow values to be shared between them and prompts such as "open mailbox" and "save/copy to mailbox". Ordinarily I wouldn't commit this to stable, but that change broke at least one person's workflow badly.
-rw-r--r--compose.c2
-rw-r--r--imap/browse.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/compose.c b/compose.c
index 1fde2c71..8836b673 100644
--- a/compose.c
+++ b/compose.c
@@ -1144,7 +1144,7 @@ int mutt_compose_menu (SEND_CONTEXT *sctx)
break;
case OP_COMPOSE_EDIT_FCC:
mutt_buffer_strcpy (fname, mutt_b2s (sctx->fcc));
- if (mutt_buffer_get_field (_("Fcc: "), fname, MUTT_FILE | MUTT_CLEAR) == 0)
+ if (mutt_buffer_get_field (_("Fcc: "), fname, MUTT_MAILBOX | MUTT_CLEAR) == 0)
{
mutt_buffer_strcpy (sctx->fcc, mutt_b2s (fname));
mutt_buffer_pretty_multi_mailbox (sctx->fcc, FccDelimiter);
diff --git a/imap/browse.c b/imap/browse.c
index b6700e53..0c70c62c 100644
--- a/imap/browse.c
+++ b/imap/browse.c
@@ -259,7 +259,7 @@ int imap_mailbox_create (const char* folder, BUFFER *result)
buf[n] = '\0';
}
- if (mutt_get_field (_("Create mailbox: "), buf, sizeof (buf), MUTT_FILE) < 0)
+ if (mutt_get_field (_("Create mailbox: "), buf, sizeof (buf), MUTT_MAILBOX) < 0)
goto fail;
if (!mutt_strlen (buf))
@@ -314,7 +314,7 @@ int imap_mailbox_rename(const char* mailbox, BUFFER *result)
snprintf(buf, sizeof (buf), _("Rename mailbox %s to: "), mx.mbox);
strfcpy (newname, mx.mbox, sizeof (newname));
- if (mutt_get_field (buf, newname, sizeof (newname), MUTT_FILE) < 0)
+ if (mutt_get_field (buf, newname, sizeof (newname), MUTT_MAILBOX) < 0)
goto fail;
if (!mutt_strlen (newname))