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 files changed, 9 insertions(+), 0 deletions(-)


# HG changeset patch
# User Kevin McCarthy <[email protected]>
# Date 1366168345 25200
# Branch HEAD
# Node ID d3096e8796e7fcbd7ed507b7502029c7f73f159e
# Parent  4c5163272b9c391b12724f9543e173c118d62003
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.

diff --git a/pager.c b/pager.c
--- a/pager.c
+++ b/pager.c
@@ -1922,16 +1922,25 @@
 
     switch (ch)
     {
       case OP_EXIT:
 	rc = -1;
 	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)
 	{
 	  topline = upNLines (PagerContext, lineInfo, curline, hideQuoted);
 	}
 	else if (option (OPTPAGERSTOP))
 	{
 	  /* emulate "less -q" and don't go on to the next message. */

Reply via email to