From 3e4064102fde1d92c501a19174b9a250dd99408c Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Tue, 16 Apr 2013 20:12:25 -0700 Subject: [PATCH] Don't exit pager if quit=ask is answered "no". This patch addresses ticket 2788. Currently if you quit ('Q') from inside the pager, with quit=ask-yes or quit=ask-no, and you respond "no", mutt leaves you back in the index menu. This patch changes it so that mutt does not exit the pager. --- pager.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pager.c b/pager.c index 7b03e902..486d8c8d 100644 --- a/pager.c +++ b/pager.c @@ -1927,6 +1927,15 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra) ch = -1; break; + case OP_QUIT: + if (query_quadoption (OPT_QUIT, _("Quit Mutt?")) == M_YES) + { + /* avoid prompting again in the index menu */ + set_quadoption (OPT_QUIT, M_YES); + ch = -1; + } + break; + case OP_NEXT_PAGE: if (lineInfo[curline].offset < sb.st_size-1) { -- 2.50.1