summaryrefslogtreecommitdiffstats
path: root/mutt_curses.h
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2018-11-25 19:48:49 -0800
committerKevin McCarthy <kevin@8t8.us>2018-11-25 19:48:49 -0800
commit55fd5122486e130e33f58c6b9288c0211db5a076 (patch)
tree30d7252218f9a9204ceaec63c1d1db1cc8d7278f /mutt_curses.h
parentf4f20e5d1ea60d65c214aedea7889a51ccdd2546 (diff)
Prevent trying to match a failing color body regex repeatedly.
Emails with really long lines (e.g. spam), can suffer performance if a complicated regex is matched to no effect over and over. If the regex failed at the beginning, it won't match at the end of another's regex match range, so turn it off.
Diffstat (limited to 'mutt_curses.h')
-rw-r--r--mutt_curses.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/mutt_curses.h b/mutt_curses.h
index d12b5790..bd563f7b 100644
--- a/mutt_curses.h
+++ b/mutt_curses.h
@@ -153,6 +153,10 @@ typedef struct color_line
short bg;
int pair;
struct color_line *next;
+
+ unsigned int stop_matching : 1; /* used by the pager for body patterns,
+ to prevent the color from being retried
+ once it fails. */
} COLOR_LINE;
#define MUTT_PROGRESS_SIZE (1<<0) /* traffic-based progress */