The muttrc can push events into the macro buffer, with the assumption
that mailbox will be opened next. This will interfere with the
prompts uses during first run. The only issue is that macros won't
work inside the folder browser, if invoked.
Co-authored-by: Richard Russon <rich@flatcap.org>
#include "muttlib.h"
#include "mx.h"
#include "ncrypt/ncrypt.h"
+#include "options.h"
#include "send.h"
/**
if (!C_Autocrypt || !C_AutocryptDir)
return -1;
+ OptIgnoreMacroEvents = true;
+
if (autocrypt_dir_init(can_create))
goto bail;
if (mutt_autocrypt_db_init(can_create))
goto bail;
+ OptIgnoreMacroEvents = false;
+
return 0;
bail:
+ OptIgnoreMacroEvents = false;
C_Autocrypt = false;
mutt_autocrypt_db_close();
return -1;