diff options
author | Kevin McCarthy <kevin@8t8.us> | 2019-08-07 18:24:15 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2019-08-07 18:24:15 -0700 |
commit | 41d9d9cfe57c56a2425f7bd83e05a22f429e87c7 (patch) | |
tree | 374ee2acc6e58491ef02f4a2a23634324e9d3ca6 /curs_lib.c | |
parent | 04817c00c2340dbf5254d10556206182e0b3f1fd (diff) |
Allow nested setting of OPTIGNOREMACROEVENTS.
This will be needed for the first-run of autocrypt initialization.
The initialization involves a number of prompts, and can even use the
folder browser. The browser could in turn connect to IMAP which might
invoke a certificate prompt, login prompt, etc.
Diffstat (limited to 'curs_lib.c')
-rw-r--r-- | curs_lib.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -242,11 +242,16 @@ int _mutt_get_field (const char *field, char *buf, size_t buflen, int complete, int mutt_get_field_unbuffered (char *msg, char *buf, size_t buflen, int flags) { - int rc; + int rc, reset_ignoremacro = 0; - set_option (OPTIGNOREMACROEVENTS); + if (!option (OPTIGNOREMACROEVENTS)) + { + set_option (OPTIGNOREMACROEVENTS); + reset_ignoremacro = 1; + } rc = mutt_get_field (msg, buf, buflen, flags); - unset_option (OPTIGNOREMACROEVENTS); + if (reset_ignoremacro) + unset_option (OPTIGNOREMACROEVENTS); return (rc); } |