summaryrefslogtreecommitdiffstats
path: root/curs_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'curs_lib.c')
-rw-r--r--curs_lib.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/curs_lib.c b/curs_lib.c
index efa76ce6..246cb6be 100644
--- a/curs_lib.c
+++ b/curs_lib.c
@@ -1093,11 +1093,19 @@ static int _enter_fname (const char *prompt, BUFFER *fname, int flags,
}
else if (ch.ch == '?')
{
+ int sel_flags = 0;
+
+ if (flags & MUTT_MAILBOX)
+ sel_flags |= MUTT_SEL_MAILBOX;
+ else if (flags & MUTT_FILE)
+ sel_flags |= MUTT_SEL_FILE;
+
+ if (multiple)
+ sel_flags |= MUTT_SEL_MULTI;
+
mutt_refresh ();
mutt_buffer_clear (fname);
- _mutt_buffer_select_file (fname,
- MUTT_SEL_FOLDER | (multiple ? MUTT_SEL_MULTI : 0),
- files, numfiles);
+ _mutt_buffer_select_file (fname, sel_flags, files, numfiles);
}
else
{