diff --git a/src/session/download.c b/src/session/download.c index 3ab40e13d..c04ebcbb5 100644 --- a/src/session/download.c +++ b/src/session/download.c @@ -810,6 +810,7 @@ continue_download_do(struct terminal *term, int fd, void *data, int resume) file_download->external_handler = subst_file(type_query->external_handler, codw_hop->file); file_download->delete = 1; + file_download->copiousoutput = type_query->copiousoutput; mem_free(codw_hop->file); mem_free_set(&type_query->external_handler, NULL); } @@ -1207,6 +1208,7 @@ setup_download_handler(struct session *ses, struct download *loading, type_query = init_type_query(ses, loading, cached); if (type_query) { ret = 1; + type_query->copiousoutput = handler->copiousoutput; #ifdef CONFIG_BITTORRENT /* A terrible waste of a good MIME handler here, but we want * to use the type_query this is easier. */ diff --git a/src/session/download.h b/src/session/download.h index 1bcc4aadf..8c80e20bc 100644 --- a/src/session/download.h +++ b/src/session/download.h @@ -48,6 +48,7 @@ struct type_query { unsigned char *target_frame; unsigned char *external_handler; int block; + unsigned int copiousoutput:1; /* int frame; */ }; @@ -75,6 +76,9 @@ struct file_download { /* Whether to block the terminal when running the external handler. */ unsigned int block:1; + /* Whether copiousoutput mode is used by the mailcap entry */ + unsigned int copiousoutput:1; + /* The current dialog for this download. Can be NULL. */ struct dialog_data *dlg_data; struct listbox_item *box_item;