From: Eric Wong Date: Thu, 28 Aug 2014 01:33:43 +0000 (+0000) Subject: view: increase MAX_INLINE_QUOTED threshold to 12 X-Git-Tag: v1.0.0~1133 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=b01b542b95d10ce9d782ceb27412b9eac873f1d8;p=public-inbox.git view: increase MAX_INLINE_QUOTED threshold to 12 12 lines is half an 80x24 terminal, so it is probably a reasonable amount to quote. Often 5 lines was not enough for context. This feature is mainly to reduce scrolling necessary to view pages. --- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 0d974281..27943391 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -11,7 +11,7 @@ use Email::MIME::ContentType qw/parse_content_type/; require POSIX; # TODO: make these constants tunable -use constant MAX_INLINE_QUOTED => 5; +use constant MAX_INLINE_QUOTED => 12; # half an 80x24 terminal use constant MAX_TRUNC_LEN => 72; use constant PRE_WRAP => '
';
 
diff --git a/t/feed.t b/t/feed.t
index 880716cc..978e2156 100644
--- a/t/feed.t
+++ b/t/feed.t
@@ -31,6 +31,15 @@ Date: Thu, 01 Jan 1970 00:00:00 +0000
 > I quote to much
 > I quote to much
 > I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
 
 msg $i
 
diff --git a/t/view.t b/t/view.t
index bc6fbed9..91ba1686 100644
--- a/t/view.t
+++ b/t/view.t
@@ -18,7 +18,14 @@ OK
 > We generate links to a separate full page where quoted-text is inline.
 > This is
 >
-> Currently 5 lines
+> Currently 12 lines
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
 > See MAX_INLINE_QUOTED
 
 hello world