summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2021-06-28 15:11:24 -0700
committerKevin McCarthy <kevin@8t8.us>2021-06-28 15:19:31 -0700
commitb53593393bab8bc0733a39a772219cf92f5a8b49 (patch)
tree3bd2012cea5ef2a530f4e0c0171818e358b7952f
parente985ad2a10a915019747ea2a51bddec9e4be4f5a (diff)
Add a hard redraw after oauth authentication.
The sample contrib program can use gpg to decrypt a token. This may pop up a curses agent prompt, requiring a hard redraw. It may be that we should be calling a hard redraw after any fork/exec. I don't know if this will cause more problems, so for now I'll just patch this one place. But that is something to consider.
-rw-r--r--account.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/account.c b/account.c
index 09bf24d3..7ef484f5 100644
--- a/account.c
+++ b/account.c
@@ -25,6 +25,7 @@
#include "mutt.h"
#include "account.h"
#include "url.h"
+#include "mutt_curses.h"
/* mutt_account_match: compare account info (host/port/user) */
int mutt_account_match (const ACCOUNT* a1, const ACCOUNT* a2)
@@ -312,6 +313,10 @@ int mutt_account_getoauthbearer (ACCOUNT* account, BUFFER *authbearer, int xoaut
safe_fclose (&fp);
mutt_wait_filter (pid);
+ /* The refresh cmd in some cases will invoke gpg to decrypt a token */
+ if (!option (OPTNOCURSES))
+ mutt_need_hard_redraw ();
+
if (token == NULL || *token == '\0')
{
mutt_error (_("mutt_account_getoauthbearer: Command returned empty string"));