]> granicus.if.org Git - mutt/commitdiff
Patch from #272 (from acli@mingpaoxpress.com).
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 10 Oct 2001 12:07:19 +0000 (12:07 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 10 Oct 2001 12:07:19 +0000 (12:07 +0000)
pager.c

diff --git a/pager.c b/pager.c
index 615a89a48a90e07f90a96659944fe21232752a97..c570a1ede7e3575f7c2782bc23f1923a4e0defc9 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -918,6 +918,15 @@ static int grok_ansi(unsigned char *buf, int pos, ansi_attr *a)
   /* Character Attributes */
   if (a != NULL && buf[x] == 'm')
   {
+    if (pos == x)
+    {
+#ifdef HAVE_COLOR
+      if (a->pair != -1)
+       mutt_free_color (a->fg, a->bg);
+#endif
+      a->attr = ANSI_OFF;
+      a->pair = -1;
+    }
     while (pos < x)
     {
       if (buf[pos] == '1' && (pos+1 == x || buf[pos+1] == ';'))