]> granicus.if.org Git - neomutt/commitdiff
Add skip_quoted_offset variable
authorDavid Sterba <dsterba@suse.cz>
Fri, 15 Nov 2013 13:21:02 +0000 (14:21 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 4 Apr 2016 02:34:40 +0000 (03:34 +0100)
Tunable for number of lines of quoted text that are displayed before the
unquoted text after 'skip to quoted' command (S).

Signed-off-by: David Sterba <dsterba@suse.cz>
globals.h
init.h
pager.c

index abefade3d1423e253e8ec5422259d7759d03ea9f..c505d45c1e3f4420ce470b92277058dfc19c9733 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -204,6 +204,7 @@ WHERE short ReflowWrap;
 WHERE short SaveHist;
 WHERE short SendmailWait;
 WHERE short SleepTime INITVAL (1);
+WHERE short SkipQuotedOffset;
 WHERE short TimeInc;
 WHERE short Timeout;
 WHERE short Wrap;
diff --git a/init.h b/init.h
index 5a12ec0d06b7267b630e858b8393704ff85fb5cd..97c1b4e139d1fb85ff55f2999809f6a6f88debc5 100644 (file)
--- a/init.h
+++ b/init.h
@@ -2703,6 +2703,12 @@ struct option_t MuttVars[] = {
   ** replacing ``%s'' with the supplied string.
   ** For the default value, ``joe'' would be expanded to: ``~f joe | ~s joe''.
   */
+  { "skip_quoted_offset", DT_NUM, R_NONE, UL &SkipQuotedOffset, 0 },
+  /*
+  ** .pp
+  ** Lines of quoted text that are displayed before the unquoted text after
+  ** 'skip to quoted' command (S)
+  */
   { "sleep_time",      DT_NUM, R_NONE, UL &SleepTime, 1 },
   /*
   ** .pp
diff --git a/pager.c b/pager.c
index 8bfe72cc9cf9de83f0884e59b89fd3d3438d2e0a..b249556dc6cafe9b5f9b1ead8f1b87f38a82964c 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -2249,11 +2249,11 @@ search_next:
          int dretval = 0;
          int new_topline = topline;
 
-         while ((new_topline < lastLine ||
+         while ((new_topline + SkipQuotedOffset < lastLine ||
                  (0 == (dretval = display_line (fp, &last_pos, &lineInfo,
                         new_topline, &lastLine, &maxLine, M_TYPES | (flags & M_PAGER_NOWRAP),
                         &QuoteList, &q_level, &force_redraw, &SearchRE))))
-                && lineInfo[new_topline].type != MT_COLOR_QUOTED)
+                && lineInfo[new_topline + SkipQuotedOffset].type != MT_COLOR_QUOTED)
            new_topline++;
 
          if (dretval < 0)
@@ -2262,11 +2262,11 @@ search_next:
            break;
          }
 
-         while ((new_topline < lastLine ||
+         while ((new_topline + SkipQuotedOffset < lastLine ||
                  (0 == (dretval = display_line (fp, &last_pos, &lineInfo,
                         new_topline, &lastLine, &maxLine, M_TYPES | (flags & M_PAGER_NOWRAP),
                         &QuoteList, &q_level, &force_redraw, &SearchRE))))
-                && lineInfo[new_topline].type == MT_COLOR_QUOTED)
+                && lineInfo[new_topline + SkipQuotedOffset].type == MT_COLOR_QUOTED)
            new_topline++;
 
          if (dretval < 0)