changeset: 7003:f44974c10990 user: Kevin McCarthy <ke...@8t8.us> date: Wed Apr 12 17:43:47 2017 -0700 link: http://dev.mutt.org/hg/mutt/rev/f44974c10990
automatic post-release commit for mutt-1.8.1 changeset: 7004:491f7cfa03d9 user: Kevin McCarthy <ke...@8t8.us> date: Wed Apr 12 17:44:20 2017 -0700 link: http://dev.mutt.org/hg/mutt/rev/491f7cfa03d9 Added tag mutt-1-8-1-rel for changeset f44974c10990 changeset: 7005:feccc2ac1b9a user: Kevin McCarthy <ke...@8t8.us> date: Wed Apr 12 17:45:28 2017 -0700 link: http://dev.mutt.org/hg/mutt/rev/feccc2ac1b9a mutt-1.8.1 signed changeset: 7006:39bf12dccf0c user: Kevin McCarthy <ke...@8t8.us> date: Wed Apr 12 18:00:22 2017 -0700 link: http://dev.mutt.org/hg/mutt/rev/39bf12dccf0c merge stable diffs (truncated from 4782 to 950 lines): diff -r b825cbcaf6b5 -r 39bf12dccf0c .hgsigs --- a/.hgsigs Tue Apr 11 12:14:47 2017 -0700 +++ b/.hgsigs Wed Apr 12 18:00:22 2017 -0700 @@ -15,3 +15,4 @@ 0ce5f9bff1fdfe86c91109312329c7e8849b347b 0 iQIcBAABCgAGBQJX+U/FAAoJEK3vdoSAMWva9mkP/3FJtWO4Aw7UVbHQUf+Or46YGGz2ABmQfdodSCAYJsp5EtgCnIOIIac5fCiqRiBBf+1W4TQ8q2JsWJN8XujiX3h4RvLPPaX0sFHRYalWiViJQN/KDisw1q9HsRqp6KUt3uQNTnzR3ZxTojeyVULQEMtMVn24L20ZiUon9NGipurLk6xb9AlYhZU1S93nhBNM71wI+V6aoYdnum8LnMvPHpZesU7/qHnADCoySLii1JMH5GXiJxeQ/n5sTTKD/6D93X2YyNE7Aq7owPsc9a7wHlGG0G95PpboDs6QL2nvMjknyQhIo7WyvGnGNK2sFjlFu69zd7jYOnuBpshVBIDhWT7Ay/Bw0x5WFUUshLHPwdNYz/LI9ZeQ2/AQh7aKTze2tCH60OaLqoGdNKSTML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ju2QKLvz2bt+ucy8O8N3MzhvuZnQJfXGpf2z6PscSG2RyizafGqaIy8F+huKgkBel7mFIqfMQtKmk5tuTNI9idUZAHNItFMBcf+I0jdBNLdMGvpWlA8Ns0WDEO/YPvUD0J74e2G341oYMyXChOJw/NXZYInc6pDPfcRmJAgchr9D1JVW0TNpUiQigemftPY6Llpylm22jfMlZfPDrF9KrGo7I6Zt5GmIRlbF5RNHpuaf5u0M7/eHqpW/a1KUOfIHGAuqdydBfJxf/tDDOXIHr5qiAXNbwdwAgHdsnhHTvpR1faxZWPtDQRw/Let7vSp9e6kfWQp4GwCfSBMQq47vaXfolhF7HHB2Ly+Fwrqle7bZ0jF7mXpvF2Wny31H7UB7EhZKtOv0fTum2REk3LePOQTCHlzy8kCL/rjDw8VNlmuwzOOvdvfGPWNfd8= diff -r b825cbcaf6b5 -r 39bf12dccf0c .hgtags --- a/.hgtags Tue Apr 11 12:14:47 2017 -0700 +++ b/.hgtags Wed Apr 12 18:00:22 2017 -0700 @@ -107,3 +107,4 @@ 0ce5f9bff1fdfe86c91109312329c7e8849b347b mutt-1-7-1-rel 99f5624d1f52ac1e9ddd55867c07b07e3bdd4fd7 mutt-1-7-2-rel d897983752f908dde07f84bada213f1b911ecf78 mutt-1-8-rel +f44974c10990ddbacf2670d82ea1448498f2fbfc mutt-1-8-1-rel diff -r b825cbcaf6b5 -r 39bf12dccf0c ChangeLog --- a/ChangeLog Tue Apr 11 12:14:47 2017 -0700 +++ b/ChangeLog Wed Apr 12 18:00:22 2017 -0700 @@ -1,3 +1,137 @@ +2017-04-11 12:14 -0700 Kevin McCarthy <ke...@8t8.us> (b825cbcaf6b5) + + * compose.c: Fix memleak when attaching files. + +2017-04-08 14:18 -0700 Kevin McCarthy <ke...@8t8.us> (a8b1017a4cc1) + + * imap/message.c: Silence imap progress messages for pipe-message. + (see #3929) + + _mutt_pipe_message() calls endwin(), and then calls pipe_msg(). If + an imap message body hasn't already been downloaded, this can end up + calling imap_fetch_message(). + + The progress messages in imap_fetch_message() were restoring curses, + just after extract_url was running. This was leading to a condition + where mutt curses didn't think the screen had changed after + extract_url exited. + + There was already a check for isendwin() inside + imap_fetch_message(), but it wasn't wrapped around the progressbar + creation/usage. Add a check for those places too. + +2017-03-27 11:39 -0700 Kevin McCarthy <ke...@8t8.us> (77032036c642) + + * init.c, init.h: Fix (un)sidebar_whitelist to expand paths. + + Thanks to Arturo for reporting the issue. + +2017-03-26 12:27 -0700 Kevin McCarthy <ke...@8t8.us> (9da67ea88f25) + + * curs_lib.c: Fix mutt_refresh() pausing during macro events. + + Changeset a07e8215a0ef split input buffering into two pools. + Unfortunately, the mutt_refresh() was not changed to check the + correct buffer count, resulting in unnecessary refreshes during + macros. + + The SSL interactive certificate prompts set OPTIGNOREMACROEVENTS and + then put up a confirmation menu. Perhaps we've just been lucky, but + it seems we should refresh the screen in those cases if we're in the + middle of a macro. Add a check for this option in mutt_refresh() + too. + +2017-03-20 10:16 -0700 Kevin McCarthy <ke...@8t8.us> (7cefa378ab7e) + + * init.c: Fix setenv overwriting to not truncate the envlist. (see + #3922) + + The refactor in 2b9c40f13e13 exposed a bug I hadn't noticed. The + match loop performed a FREE() on the slot. Then, below, it was + checking if (*envp) to see whether it was overwriting or creating a + new slot. However, FREE() nulls out *envp. This would end up + truncating the envlist just after the set slot! + + Move the free down, using a mutt_str_replace(), when overwriting the + slot. + +2017-03-18 14:39 -0700 Kevin McCarthy <ke...@8t8.us> (2b9c40f13e13) + + * init.c: Fix mutt_envlist_set() for the case that envlist is null. + (see #3922) + +2017-03-18 13:48 -0700 Kevin McCarthy <ke...@8t8.us> (37209157e33c) + + * filter.c, init.c, protos.h, system.c: Pass envlist to filter + children too. (closes #3922) + + The new setenv patch neglected to pass the envlist for filters too. + + Unfortunately, the filter code was already set up to pass COLUMNS to + children, so it needed to be changed to add this to the envlist + instead. + + Factor out mutt_envlist_set() from the parse_setenv() function, + which the filter code can then use to set COLUMNS after forking. + +2017-03-05 15:24 -0800 Kevin McCarthy <ke...@8t8.us> (f0e3b2875065) + + * account.h: Increase ACCOUNT.pass field size. (closes #3921) + + #3921 reported his password token used for Google XOAUTH2 is size + 129. The ACCOUNT structure currently uses a size 128 buffer. Who + knew a password field would ever be bigger than that? + + Since the ACCOUNT structure has no allocation/dellocation routines, + the easiest fix is to increase the size. Bump the size up to 256. + +2017-03-02 15:53 -0800 Matthias Andree <matthias.and...@gmx.de> (5fc3c0729a07) + + * mutt_ssl.c: SSL: Fix memory leak in subject alternative name code. + (closes #3920) + +2017-03-02 14:53 -0800 Kevin McCarthy <ke...@8t8.us> (e3e47b2f1370) + + * mbox.c: Prevent segv if open-appending to an mbox fails. (closes + #3918) + + If mbox_open_mailbox_append() fails, ctx->fp will be null. Add a + check in mbox_close_mailbox(), to prevent a segv from passing null + to fileno(). + +2017-03-02 13:11 -0800 Kevin McCarthy <ke...@8t8.us> (e82253beaa9f) + + * mutt_ssl.c: Clear out extraneous errors before SSL_connect() (see + #3916) + + Call ERR_clear_error() just before the call to SSL_connect() to make + sure the error queue doesn't have any old errors in it. + + PEM_read_X509() sets an error PEM_R_NO_START_LINE on end-of-file. + Clear that out so it doesn't show up as the SSL_connect() error + message. + +2017-02-24 11:00 -0800 Kevin McCarthy <ke...@8t8.us> (f85c3eb8d065) + + * merge default into stable + +2017-02-24 10:55 -0800 Kevin McCarthy <ke...@8t8.us> (7cc47d82cac4) + + * .hgsigs: mutt-1.8.0 signed + +2017-02-24 10:50 -0800 Kevin McCarthy <ke...@8t8.us> (1672b430cbc3) + + * .hgtags: Added tag mutt-1-8-rel for changeset d897983752f9 + +2017-02-24 10:50 -0800 Kevin McCarthy <ke...@8t8.us> (d897983752f9) + + * ChangeLog, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, + po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, + po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, + po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, + po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, + po/zh_TW.po: automatic post-release commit for mutt-1.8.0 + 2017-02-23 08:56 -0800 TAKAHASHI Tamotsu <tta...@lapis.plala.or.jp> (43e312cee971) * po/ja.po: Updated Japanese translation. diff -r b825cbcaf6b5 -r 39bf12dccf0c UPDATING --- a/UPDATING Tue Apr 11 12:14:47 2017 -0700 +++ b/UPDATING Wed Apr 12 18:00:22 2017 -0700 @@ -8,6 +8,10 @@ The keys used are: !: modified feature, -: deleted feature, +: new feature +1.8.1 (2017-04-13): + + ! Bug fix release. + 1.8.0 (2017-02-24): - $locale has been removed. Mutt now respects the LC_TIME setting diff -r b825cbcaf6b5 -r 39bf12dccf0c VERSION --- a/VERSION Tue Apr 11 12:14:47 2017 -0700 +++ b/VERSION Wed Apr 12 18:00:22 2017 -0700 @@ -1,1 +1,1 @@ -1.8.0 +1.8.1 diff -r b825cbcaf6b5 -r 39bf12dccf0c addrbook.c --- a/addrbook.c Tue Apr 11 12:14:47 2017 -0700 +++ b/addrbook.c Wed Apr 12 18:00:22 2017 -0700 @@ -145,15 +145,13 @@ mutt_error _("You have no aliases!"); return; } - - /* tell whoever called me to redraw the screen when I return */ - set_option (OPTNEEDREDRAW); - + menu = mutt_new_menu (MENU_ALIAS); menu->make_entry = alias_entry; menu->tag = alias_tag; menu->title = _("Aliases"); menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_ALIAS, AliasHelp); + mutt_push_current_menu (menu); new_aliases: @@ -237,6 +235,7 @@ rfc822_write_address (buf, buflen, AliasTable[t]->addr, 1); } + mutt_pop_current_menu (menu); mutt_menuDestroy (&menu); FREE (&AliasTable); diff -r b825cbcaf6b5 -r 39bf12dccf0c browser.c --- a/browser.c Tue Apr 11 12:14:47 2017 -0700 +++ b/browser.c Wed Apr 12 18:00:22 2017 -0700 @@ -492,17 +492,20 @@ tmp->msg_unread = Context->unread; } + strfcpy (buffer, NONULL (tmp->path), sizeof (buffer)); + mutt_pretty_mailbox (buffer, sizeof (buffer)); + #ifdef USE_IMAP if (mx_is_imap (tmp->path)) { - add_folder (menu, state, tmp->path, NULL, tmp); + add_folder (menu, state, buffer, NULL, tmp); continue; } #endif #ifdef USE_POP if (mx_is_pop (tmp->path)) { - add_folder (menu, state, tmp->path, NULL, tmp); + add_folder (menu, state, buffer, NULL, tmp); continue; } #endif @@ -528,9 +531,6 @@ s.st_mtime = st2.st_mtime; } - strfcpy (buffer, NONULL(tmp->path), sizeof (buffer)); - mutt_pretty_mailbox (buffer, sizeof (buffer)); - add_folder (menu, state, buffer, &s, tmp); } while ((tmp = tmp->next)); @@ -611,7 +611,7 @@ char helpstr[LONG_STRING]; char title[STRING]; struct browser_state state; - MUTTMENU *menu; + MUTTMENU *menu = NULL; struct stat st; int i, killPrefix = 0; int multiple = (flags & MUTT_SEL_MULTI) ? 1 : 0; @@ -722,6 +722,7 @@ menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_FOLDER, FolderHelp); + mutt_push_current_menu (menu); init_menu (&state, menu, title, sizeof (title), buffy); @@ -908,7 +909,6 @@ } destroy_state (&state); - mutt_menuDestroy (&menu); goto bail; case OP_BROWSER_TELL: @@ -954,7 +954,6 @@ menu->current = 0; menu->top = 0; init_menu (&state, menu, title, sizeof (title), buffy); - MAYBE_REDRAW (menu->redraw); } /* else leave error on screen */ break; @@ -977,7 +976,6 @@ menu->current = 0; menu->top = 0; init_menu (&state, menu, title, sizeof (title), buffy); - MAYBE_REDRAW (menu->redraw); } } break; @@ -1015,7 +1013,6 @@ state.entrylen--; mutt_message _("Mailbox deleted."); init_menu (&state, menu, title, sizeof (title), buffy); - MAYBE_REDRAW (menu->redraw); } } else @@ -1080,7 +1077,6 @@ mutt_error _("Error scanning directory."); if (examine_directory (menu, &state, LastDir, prefix) == -1) { - mutt_menuDestroy (&menu); goto bail; } } @@ -1095,7 +1091,6 @@ mutt_perror (buf); } } - MAYBE_REDRAW (menu->redraw); break; case OP_ENTER_MASK: @@ -1151,7 +1146,6 @@ else { mutt_error _("Error scanning directory."); - mutt_menuDestroy (&menu); goto bail; } killPrefix = 0; @@ -1162,7 +1156,6 @@ } } } - MAYBE_REDRAW (menu->redraw); break; case OP_SORT: @@ -1246,10 +1239,8 @@ { strfcpy (f, buf, flen); destroy_state (&state); - mutt_menuDestroy (&menu); goto bail; } - MAYBE_REDRAW (menu->redraw); break; case OP_BROWSER_VIEW_FILE: @@ -1264,7 +1255,6 @@ { strfcpy (f, state.entry[menu->current].name, flen); destroy_state (&state); - mutt_menuDestroy (&menu); goto bail; } else @@ -1296,7 +1286,13 @@ } bail: - + + if (menu) + { + mutt_pop_current_menu (menu); + mutt_menuDestroy (&menu); + } + if (!folder) strfcpy (LastDir, LastDirBackup, sizeof (LastDir)); diff -r b825cbcaf6b5 -r 39bf12dccf0c buffy.c --- a/buffy.c Tue Apr 11 12:14:47 2017 -0700 +++ b/buffy.c Wed Apr 12 18:00:22 2017 -0700 @@ -27,6 +27,7 @@ #include "mx.h" #include "mutt_curses.h" +#include "mutt_menu.h" #ifdef USE_SIDEBAR #include "sidebar.h" @@ -580,7 +581,7 @@ (orig_count != tmp->msg_count) || (orig_unread != tmp->msg_unread) || (orig_flagged != tmp->msg_flagged)) - SidebarNeedsRedraw = 1; + mutt_set_current_menu_redraw (REDRAW_SIDEBAR); #endif if (!tmp->new) diff -r b825cbcaf6b5 -r 39bf12dccf0c color.c --- a/color.c Tue Apr 11 12:14:47 2017 -0700 +++ b/color.c Wed Apr 12 18:00:22 2017 -0700 @@ -22,6 +22,7 @@ #include "mutt.h" #include "mutt_curses.h" +#include "mutt_menu.h" #include "mapping.h" #include <string.h> @@ -494,7 +495,7 @@ if (do_cache && !option (OPTNOCURSES)) { int i; - set_option (OPTFORCEREDRAWINDEX); + mutt_set_menu_redraw_full (MENU_MAIN); /* force re-caching of index colors */ for (i = 0; Context && i < Context->msgcount; i++) Context->hdrs[i]->pair = 0; @@ -771,7 +772,7 @@ else if (object == MT_COLOR_INDEX) { r = add_pattern (&ColorIndexList, buf->data, 1, fg, bg, attr, err, 1); - set_option (OPTFORCEREDRAWINDEX); + mutt_set_menu_redraw_full (MENU_MAIN); } else if (object == MT_COLOR_QUOTED) { diff -r b825cbcaf6b5 -r 39bf12dccf0c commands.c --- a/commands.c Tue Apr 11 12:14:47 2017 -0700 +++ b/commands.c Wed Apr 12 18:00:22 2017 -0700 @@ -238,7 +238,7 @@ return rc; } -void ci_bounce_message (HEADER *h, int *redraw) +void ci_bounce_message (HEADER *h) { char prompt[SHORT_STRING]; char scratch[SHORT_STRING]; @@ -276,13 +276,6 @@ strfcpy(prompt, _("Bounce tagged messages to: "), sizeof(prompt)); rc = mutt_get_field (prompt, buf, sizeof (buf), MUTT_ALIAS); - - if (option (OPTNEEDREDRAW)) - { - unset_option (OPTNEEDREDRAW); - *redraw = REDRAW_FULL; - } - if (rc || !buf[0]) return; @@ -413,10 +406,12 @@ mutt_perror _("Can't create filter process"); return 1; } - + + set_option (OPTKEEPQUIET); pipe_msg (h, fpout, decode, print); safe_fclose (&fpout); rc = mutt_wait_filter (thepid); + unset_option (OPTKEEPQUIET); } else { /* handle tagged messages */ @@ -447,12 +442,14 @@ mutt_perror _("Can't create filter process"); return 1; } + set_option (OPTKEEPQUIET); pipe_msg (Context->hdrs[Context->v2r[i]], fpout, decode, print); /* add the message separator */ if (sep) fputs (sep, fpout); safe_fclose (&fpout); if (mutt_wait_filter (thepid) != 0) rc = 1; + unset_option (OPTKEEPQUIET); } } } @@ -464,6 +461,7 @@ mutt_perror _("Can't create filter process"); return 1; } + set_option (OPTKEEPQUIET); for (i = 0; i < Context->vcount; i++) { if (Context->hdrs[Context->v2r[i]]->tagged) @@ -477,6 +475,7 @@ safe_fclose (&fpout); if (mutt_wait_filter (thepid) != 0) rc = 1; + unset_option (OPTKEEPQUIET); } } @@ -734,8 +733,7 @@ } /* returns 0 if the copy/save was successful, or -1 on error/abort */ -int mutt_save_message (HEADER *h, int delete, - int decode, int decrypt, int *redraw) +int mutt_save_message (HEADER *h, int delete, int decode, int decrypt) { int i, need_buffy_cleanup; int need_passphrase = 0, app=0; @@ -743,9 +741,6 @@ CONTEXT ctx; struct stat st; - *redraw = 0; - - snprintf (prompt, sizeof (prompt), decode ? (delete ? _("Decode-save%s to mailbox") : _("Decode-copy%s to mailbox")) : @@ -793,17 +788,9 @@ } mutt_pretty_mailbox (buf, sizeof (buf)); - if (mutt_enter_fname (prompt, buf, sizeof (buf), redraw, 0) == -1) + if (mutt_enter_fname (prompt, buf, sizeof (buf), 0) == -1) return (-1); - if (*redraw != REDRAW_FULL) - { - if (!h) - *redraw = REDRAW_INDEX | REDRAW_STATUS; - else - *redraw = REDRAW_STATUS; - } - if (!buf[0]) return (-1); diff -r b825cbcaf6b5 -r 39bf12dccf0c compose.c --- a/compose.c Tue Apr 11 12:14:47 2017 -0700 +++ b/compose.c Wed Apr 12 18:00:22 2017 -0700 @@ -273,7 +273,7 @@ NORMAL_COLOR; } -static int edit_address_list (int line, ADDRESS **addr) +static void edit_address_list (int line, ADDRESS **addr) { char buf[HUGE_STRING] = ""; /* needs to be large for alias expansion */ char *err = NULL; @@ -287,12 +287,6 @@ *addr = mutt_expand_aliases (*addr); } - if (option (OPTNEEDREDRAW)) - { - unset_option (OPTNEEDREDRAW); - return (REDRAW_FULL); - } - if (mutt_addrlist_to_intl (*addr, &err) != 0) { mutt_error (_("Warning: '%s' is a bad IDN."), err); @@ -305,8 +299,6 @@ rfc822_write_address (buf, sizeof (buf), *addr, 1); mutt_window_move (MuttIndexWindow, line, HDR_XOFFSET); mutt_paddstr (W, buf); - - return 0; } static int delete_attachment (MUTTMENU *menu, short *idxlen, int x) @@ -476,6 +468,54 @@ (unsigned long) menu, 0); } +typedef struct +{ + HEADER *msg; + char *fcc; +} compose_redraw_data_t; + +static void compose_menu_redraw (MUTTMENU *menu) +{ + char buf[LONG_STRING]; + compose_redraw_data_t *rd = menu->redraw_data; + + if (!rd) + return; + + if (menu->redraw & REDRAW_FULL) + { + menu_redraw_full (menu); + + draw_envelope (rd->msg, rd->fcc); + menu->offset = HDR_ATTACH; + menu->pagelen = MuttIndexWindow->rows - HDR_ATTACH; + } + + menu_check_recenter (menu); + + if (menu->redraw & REDRAW_STATUS) + { + compose_status_line (buf, sizeof (buf), 0, MuttStatusWindow->cols, menu, NONULL(ComposeFormat)); + mutt_window_move (MuttStatusWindow, 0, 0); + SETCOLOR (MT_COLOR_STATUS); + mutt_paddstr (MuttStatusWindow->cols, buf); + NORMAL_COLOR; + menu->redraw &= ~REDRAW_STATUS; + } + +#ifdef USE_SIDEBAR + if (menu->redraw & REDRAW_SIDEBAR) + menu_redraw_sidebar (menu); +#endif + + if (menu->redraw & REDRAW_INDEX) + menu_redraw_index (menu); + else if (menu->redraw & (REDRAW_MOTION | REDRAW_MOTION_RESYNCH)) + menu_redraw_motion (menu); + else if (menu->redraw == REDRAW_CURRENT) + menu_redraw_current (menu); +} + /* return values: * @@ -505,6 +545,10 @@ /* Sort, SortAux could be changed in mutt_index_menu() */ int oldSort, oldSortAux; struct stat st; + compose_redraw_data_t rd; + + rd.msg = msg; + rd.fcc = fcc; mutt_attach_init (msg->content); idx = mutt_gen_attach_list (msg->content, -1, idx, &idxlen, &idxmax, 0, 1); @@ -516,22 +560,20 @@ menu->tag = mutt_tag_attach; menu->data = idx; menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_COMPOSE, ComposeHelp); + menu->custom_menu_redraw = compose_menu_redraw; + menu->redraw_data = &rd; + mutt_push_current_menu (menu); while (loop) { switch (op = mutt_menuLoop (menu)) { - case OP_REDRAW: - draw_envelope (msg, fcc); - menu->offset = HDR_ATTACH; - menu->pagelen = MuttIndexWindow->rows - HDR_ATTACH; - break; case OP_COMPOSE_EDIT_FROM: - menu->redraw = edit_address_list (HDR_FROM, &msg->env->from); + edit_address_list (HDR_FROM, &msg->env->from); mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); break; case OP_COMPOSE_EDIT_TO: - menu->redraw = edit_address_list (HDR_TO, &msg->env->to); + edit_address_list (HDR_TO, &msg->env->to); if (option (OPTCRYPTOPPORTUNISTICENCRYPT)) { crypt_opportunistic_encrypt (msg); @@ -540,7 +582,7 @@ mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); break; case OP_COMPOSE_EDIT_BCC: - menu->redraw = edit_address_list (HDR_BCC, &msg->env->bcc); + edit_address_list (HDR_BCC, &msg->env->bcc); if (option (OPTCRYPTOPPORTUNISTICENCRYPT)) { crypt_opportunistic_encrypt (msg); @@ -549,7 +591,7 @@ mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); break; case OP_COMPOSE_EDIT_CC: - menu->redraw = edit_address_list (HDR_CC, &msg->env->cc); + edit_address_list (HDR_CC, &msg->env->cc); if (option (OPTCRYPTOPPORTUNISTICENCRYPT)) { crypt_opportunistic_encrypt (msg); @@ -574,7 +616,7 @@ mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); break; case OP_COMPOSE_EDIT_REPLY_TO: - menu->redraw = edit_address_list (HDR_REPLYTO, &msg->env->reply_to); + edit_address_list (HDR_REPLYTO, &msg->env->reply_to); mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); break; case OP_COMPOSE_EDIT_FCC: @@ -587,7 +629,6 @@ mutt_paddstr (W, fcc); fccSet = 1; } - MAYBE_REDRAW (menu->redraw); mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); break; case OP_COMPOSE_EDIT_MESSAGE: @@ -666,12 +707,6 @@ FREE (&idx[idxlen]); menu->redraw |= REDRAW_STATUS; - - if (option(OPTNEEDREDRAW)) - { - menu->redraw = REDRAW_FULL; - unset_option(OPTNEEDREDRAW); - } mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); break; @@ -687,7 +722,7 @@ numfiles = 0; files = NULL; - if (_mutt_enter_fname (prompt, fname, sizeof (fname), &menu->redraw, 0, 1, &files, &numfiles) == -1 || + if (_mutt_enter_fname (prompt, fname, sizeof (fname), 0, 1, &files, &numfiles) == -1 || *fname == '\0') break; @@ -739,7 +774,7 @@ mutt_pretty_mailbox (fname, sizeof (fname)); } - if (mutt_enter_fname (prompt, fname, sizeof (fname), &menu->redraw, 1) == -1 || !fname[0]) + if (mutt_enter_fname (prompt, fname, sizeof (fname), 1) == -1 || !fname[0]) break; mutt_expand_path (fname, sizeof (fname)); @@ -1164,7 +1199,6 @@ case OP_SAVE: CHECK_COUNT; mutt_save_attachment_list (NULL, menu->tagprefix, menu->tagprefix ? msg->content : idx[menu->current]->content, NULL, menu); - MAYBE_REDRAW (menu->redraw); /* no send2hook, since this doesn't modify the message */ break; @@ -1250,7 +1284,7 @@ if (idxlen) msg->content = idx[0]->content; if (mutt_enter_fname (_("Write message to mailbox"), fname, sizeof (fname), - &menu->redraw, 1) != -1 && fname[0]) + 1) != -1 && fname[0]) { mutt_message (_("Writing message to %s ..."), fname); mutt_expand_path (fname, sizeof (fname)); @@ -1288,7 +1322,7 @@ crypt_opportunistic_encrypt (msg); redraw_crypt_lines (msg); } - msg->security = crypt_pgp_send_menu (msg, &menu->redraw); + msg->security = crypt_pgp_send_menu (msg); redraw_crypt_lines (msg); mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); break; @@ -1321,7 +1355,7 @@ crypt_opportunistic_encrypt (msg); redraw_crypt_lines (msg); } - msg->security = crypt_smime_send_menu(msg, &menu->redraw); + msg->security = crypt_smime_send_menu(msg); redraw_crypt_lines (msg); mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); break; @@ -1330,25 +1364,15 @@ #ifdef MIXMASTER case OP_COMPOSE_MIX: - mix_make_chain (&msg->chain, &menu->redraw); + mix_make_chain (&msg->chain); mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); break; #endif } - - /* Draw formatted compose status line */ - if (menu->redraw & REDRAW_STATUS) - { - compose_status_line (buf, sizeof (buf), 0, MuttStatusWindow->cols, menu, NONULL(ComposeFormat)); - mutt_window_move (MuttStatusWindow, 0, 0); - SETCOLOR (MT_COLOR_STATUS); - mutt_paddstr (MuttStatusWindow->cols, buf); - NORMAL_COLOR; - menu->redraw &= ~REDRAW_STATUS; - } } + mutt_pop_current_menu (menu); mutt_menuDestroy (&menu); if (idxlen) diff -r b825cbcaf6b5 -r 39bf12dccf0c configure.ac --- a/configure.ac Tue Apr 11 12:14:47 2017 -0700 +++ b/configure.ac Wed Apr 12 18:00:22 2017 -0700 @@ -710,6 +710,11 @@ AC_CHECK_DECLS([SSL_set_mode, SSL_MODE_AUTO_RETRY],, AC_MSG_ERROR([Unable to find decent SSL header]), [[#include <openssl/ssl.h>]]) + AC_CHECK_DECL([X509_V_FLAG_PARTIAL_CHAIN], + AC_DEFINE(HAVE_SSL_PARTIAL_CHAIN,1,[ Define if OpenSSL supports partial chains. ]), + , + [[#include <openssl/x509_vfy.h>]]) + AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ]) AC_DEFINE(USE_SSL_OPENSSL,1,[ Define if you want support for SSL via OpenSSL. ]) LIBS="$saved_LIBS" diff -r b825cbcaf6b5 -r 39bf12dccf0c crypt-gpgme.c --- a/crypt-gpgme.c Tue Apr 11 12:14:47 2017 -0700 +++ b/crypt-gpgme.c Wed Apr 12 18:00:22 2017 -0700 @@ -4031,6 +4031,7 @@ menu->make_entry = crypt_entry; menu->help = helpstr; menu->data = key_table; + mutt_push_current_menu (menu); { const char *ts; @@ -4139,10 +4140,9 @@ } } + mutt_pop_current_menu (menu); mutt_menuDestroy (&menu); FREE (&key_table); - - set_option (OPTNEEDREDRAW); return k; } @@ -4701,7 +4701,7 @@ init_smime (); } -static int gpgme_send_menu (HEADER *msg, int *redraw, int is_smime) +static int gpgme_send_menu (HEADER *msg, int is_smime) { crypt_key_t *p; char input_signas[SHORT_STRING]; @@ -4806,7 +4806,6 @@ msg->security |= SIGN; } - *redraw = REDRAW_FULL; break; case 'b': /* (b)oth */ @@ -4853,14 +4852,14 @@ return (msg->security); } -int pgp_gpgme_send_menu (HEADER *msg, int *redraw) +int pgp_gpgme_send_menu (HEADER *msg) { - return gpgme_send_menu (msg, redraw, 0); + return gpgme_send_menu (msg, 0); } -int smime_gpgme_send_menu (HEADER *msg, int *redraw) +int smime_gpgme_send_menu (HEADER *msg) { - return gpgme_send_menu (msg, redraw, 1); + return gpgme_send_menu (msg, 1); } static int verify_sender (HEADER *h, gpgme_protocol_t protocol) diff -r b825cbcaf6b5 -r 39bf12dccf0c crypt-gpgme.h --- a/crypt-gpgme.h Tue Apr 11 12:14:47 2017 -0700 +++ b/crypt-gpgme.h Wed Apr 12 18:00:22 2017 -0700 @@ -48,8 +48,8 @@ int pgp_gpgme_verify_one (BODY *sigbdy, STATE *s, const char *tempfile); int smime_gpgme_verify_one (BODY *sigbdy, STATE *s, const char *tempfile); -int pgp_gpgme_send_menu (HEADER *msg, int *redraw); -int smime_gpgme_send_menu (HEADER *msg, int *redraw); +int pgp_gpgme_send_menu (HEADER *msg); +int smime_gpgme_send_menu (HEADER *msg); int smime_gpgme_verify_sender (HEADER *h); diff -r b825cbcaf6b5 -r 39bf12dccf0c crypt-mod-pgp-classic.c --- a/crypt-mod-pgp-classic.c Tue Apr 11 12:14:47 2017 -0700 +++ b/crypt-mod-pgp-classic.c Wed Apr 12 18:00:22 2017 -0700 @@ -61,9 +61,9 @@ return pgp_verify_one (sigbdy, s, tempf); } -static int crypt_mod_pgp_send_menu (HEADER *msg, int *redraw) +static int crypt_mod_pgp_send_menu (HEADER *msg) { - return pgp_send_menu (msg, redraw); + return pgp_send_menu (msg); } static BODY *crypt_mod_pgp_encrypt_message (BODY *a, char *keylist, int sign) diff -r b825cbcaf6b5 -r 39bf12dccf0c crypt-mod-pgp-gpgme.c --- a/crypt-mod-pgp-gpgme.c Tue Apr 11 12:14:47 2017 -0700 +++ b/crypt-mod-pgp-gpgme.c Wed Apr 12 18:00:22 2017 -0700 @@ -85,9 +85,9 @@ return pgp_gpgme_verify_one (sigbdy, s, tempf); } -static int crypt_mod_pgp_send_menu (HEADER *msg, int *redraw) +static int crypt_mod_pgp_send_menu (HEADER *msg) { - return pgp_gpgme_send_menu (msg, redraw); + return pgp_gpgme_send_menu (msg); } static BODY *crypt_mod_pgp_encrypt_message (BODY *a, char *keylist, int sign) diff -r b825cbcaf6b5 -r 39bf12dccf0c crypt-mod-smime-classic.c --- a/crypt-mod-smime-classic.c Tue Apr 11 12:14:47 2017 -0700 +++ b/crypt-mod-smime-classic.c Wed Apr 12 18:00:22 2017 -0700 @@ -61,9 +61,9 @@ return smime_verify_one (sigbdy, s, tempf); } -static int crypt_mod_smime_send_menu (HEADER *msg, int *redraw) +static int crypt_mod_smime_send_menu (HEADER *msg) { - return smime_send_menu (msg, redraw); + return smime_send_menu (msg); } static void crypt_mod_smime_getkeys (ENVELOPE *env) diff -r b825cbcaf6b5 -r 39bf12dccf0c crypt-mod-smime-gpgme.c --- a/crypt-mod-smime-gpgme.c Tue Apr 11 12:14:47 2017 -0700 +++ b/crypt-mod-smime-gpgme.c Wed Apr 12 18:00:22 2017 -0700 @@ -70,9 +70,9 @@ return smime_gpgme_verify_one (sigbdy, s, tempf); } -static int crypt_mod_smime_send_menu (HEADER *msg, int *redraw) +static int crypt_mod_smime_send_menu (HEADER *msg) { - return smime_gpgme_send_menu (msg, redraw); + return smime_gpgme_send_menu (msg); } static BODY *crypt_mod_smime_build_smime_entity (BODY *a, char *certlist) diff -r b825cbcaf6b5 -r 39bf12dccf0c crypt-mod.h --- a/crypt-mod.h Tue Apr 11 12:14:47 2017 -0700 +++ b/crypt-mod.h Wed Apr 12 18:00:22 2017 -0700 @@ -53,7 +53,7 @@ typedef void (*crypt_func_pgp_extract_keys_from_attachment_list_t) (FILE *fp, int tag, BODY *top); -typedef int (*crypt_func_send_menu_t) (HEADER *msg, int *redraw); +typedef int (*crypt_func_send_menu_t) (HEADER *msg); /* (SMIME) */ typedef void (*crypt_func_smime_getkeys_t) (ENVELOPE *env); diff -r b825cbcaf6b5 -r 39bf12dccf0c cryptglue.c --- a/cryptglue.c Tue Apr 11 12:14:47 2017 -0700 +++ b/cryptglue.c Wed Apr 12 18:00:22 2017 -0700 @@ -246,10 +246,10 @@ } -int crypt_pgp_send_menu (HEADER *msg, int *redraw) +int crypt_pgp_send_menu (HEADER *msg) { if (CRYPT_MOD_CALL_CHECK (PGP, send_menu)) - return (CRYPT_MOD_CALL (PGP, send_menu)) (msg, redraw); + return (CRYPT_MOD_CALL (PGP, send_menu)) (msg); return 0; } @@ -380,10 +380,10 @@