summaryrefslogtreecommitdiffstats
path: root/browser.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-05-17 12:37:24 -0700
committerKevin McCarthy <kevin@8t8.us>2020-05-17 12:42:48 -0700
commit95cf171ef67f7548a60707bc652ada5e31301c57 (patch)
treea619f4be723572503d98ef6b11449cee6810bf48 /browser.c
parent1f20684afabbe6c4645eca72e5b7d52a62ea378a (diff)
Fix attach-file tag operation to work when quitting browser.
There was a disconnect between the compose menu and the behavior when selecting multiple files. The select_file() operation populates the files and numfiles when hitting 'quit'. The compose menu was incorrectly looking at the fname parameter, which won't be populated unless the user presses enter. The enter_string() menu makes the same mistake. Change it to behave differently depending on whether multiple is set. The logic needs to be made clearer by changing the api. I will do that in the next commit.
Diffstat (limited to 'browser.c')
-rw-r--r--browser.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/browser.c b/browser.c
index f9c37c95..c843a0ae 100644
--- a/browser.c
+++ b/browser.c
@@ -692,6 +692,11 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
mutt_buffer_pool_release (&f_buf);
}
+/* If flags & MUTT_SELECT_MULTI is set, numfiles and files will contain
+ * the (one or more) selected files.
+ *
+ * If MUTT_SELECT_MULTI is not set, then the result, if any, will be in f
+ */
void _mutt_buffer_select_file (BUFFER *f, int flags, char ***files, int *numfiles)
{
BUFFER *buf = NULL;