Andreas Krennmair:
[apps/madmutt.git] / menu.c
diff --git a/menu.c b/menu.c
index 95bc43e..2243919 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -35,24 +35,15 @@ extern size_t UngetCount;
 
 static void print_enriched_string (int attr, unsigned char *s, int do_color)
 {
-  wchar_t wc;
   size_t k;
   size_t n = mutt_strlen ((char *)s);
-  mbstate_t mbstate;
-  short f1, f2, b1, b2;
 
-  memset (&mbstate, 0, sizeof (mbstate));
   while (*s)
   {
     if (*s < M_TREE_MAX)
     {
       if (do_color)
-      {
-        pair_content(PAIR_NUMBER(ColorDefs[MT_COLOR_TREE]), &f1, &b1);
-        pair_content(PAIR_NUMBER(attr), &f2, &b2);
-        if (b1 == b2)
-          SETCOLOR (MT_COLOR_TREE);
-      }
+        SETCOLOR (MT_COLOR_TREE);
       while (*s && *s < M_TREE_MAX)
       {
         switch (*s)
@@ -136,10 +127,10 @@ static void print_enriched_string (int attr, unsigned char *s, int do_color)
       }
       if (do_color) attrset(attr);
     }
-    else if ((k = mbrtowc (&wc, (char *)s, n, &mbstate)) > 0)
+    else if (*s > 0)
     {
-      addnstr ((char *)s, k);
-      s += k, n-= k;
+      addnstr ((char *)s, 1);
+      s += 1, n-= 1;
     }
     else
       break;
@@ -700,7 +691,7 @@ void mutt_menuDestroy (MUTTMENU **p)
     for (i=0; i < (*p)->max; i++)
       FREE (&(*p)->dialog[i]);
 
-    FREE ((*p)->dialog);
+    FREE ((*p)->dialog);
   }
 
   FREE (p);