From 800462acf861776b73cdc57d6e73770e1c37983b Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Mon, 7 Oct 2019 13:07:26 +0100 Subject: [PATCH] fix: broken index_format A chance alignment made enum symbol MT_COLOR_INDEX_NUMBER equal to 37 (ASCII %). This was causing problems when inserting colour codes into the index_format string. --- color.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/color.h b/color.h index 7a30322ad..f847132a7 100644 --- a/color.h +++ b/color.h @@ -51,10 +51,14 @@ STAILQ_HEAD(ColorLineList, ColorLine); /** * enum ColorId - List of all colored objects + * + * This enumeration starts at 50 to avoid any of the values being 37 (ASCII %). + * Inserting colour codes into expando strings, when one of the colour codes + * was '%', was causing formatting problems. */ enum ColorId { - MT_COLOR_HDEFAULT = 0, ///< Header default colour + MT_COLOR_HDEFAULT = 50, ///< Header default colour MT_COLOR_QUOTED, ///< Pager: quoted text MT_COLOR_SIGNATURE, ///< Pager: signature lines MT_COLOR_INDICATOR, ///< Selected item in list -- 2.40.0