From f55b6e0f4bddcbc5a891e43fe921fa3f1e02715f Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Mon, 12 Jun 2017 18:29:48 -0700 Subject: [PATCH] Force hard redraw after $sendmail instead of calling mutt_endwin. (closes #3952) (see #3948) Adding a mutt_endwin() seemed like a clean solution to allowing ncurses pinentry for $sendmail, but it leaves other users watching a blank screen. This change is extremely likely to generate a large number of complaints and bug reports. So instead, force a hard refresh afterwards. --- sendlib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sendlib.c b/sendlib.c index 19e350c87..2a2d168ac 100644 --- a/sendlib.c +++ b/sendlib.c @@ -2517,7 +2517,13 @@ int mutt_invoke_sendmail(struct Address *from, /* the sender */ args[argslen++] = NULL; - mutt_endwin(NULL); + /* Some user's $sendmail command uses gpg for password decryption, + * and is set up to prompt using ncurses pinentry. If we + * mutt_endwin() it leaves other users staring at a blank screen. + * So instead, just force a hard redraw on the next refresh. */ + if (!option(OPTNOCURSES)) + mutt_need_hard_redraw(); + if ((i = send_msg(path, args, msg, option(OPTNOCURSES) ? NULL : &childout)) != (EX_OK & 0xff)) { if (i != S_BKG) -- 2.40.0