]> granicus.if.org Git - neomutt/commitdiff
mutt_str_startswith - pager.c
authorPietro Cerutti <gahr@gahr.ch>
Fri, 9 Nov 2018 15:50:42 +0000 (15:50 +0000)
committerRichard Russon <rich@flatcap.org>
Wed, 14 Nov 2018 15:10:31 +0000 (15:10 +0000)
pager.c

diff --git a/pager.c b/pager.c
index 8d62ca7dcf4e6609e5fb4973029fc0764f5581ab..9f8cfdcc8f58349c56b4a85dee722e7b349d1e6d 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -944,7 +944,7 @@ static void resolve_types(char *buf, char *raw, struct Line *line_info, int n,
       }
     }
   }
-  else if (mutt_str_strncmp("\033[0m", raw, 4) == 0) /* a little hack... */
+  else if (mutt_str_startswith(raw, "\033[0m", CASE_MATCH)) /* a little hack... */
     line_info[n].type = MT_COLOR_NORMAL;
   else if (check_attachment_marker((char *) raw) == 0)
     line_info[n].type = MT_COLOR_ATTACHMENT;