<<< Date Index >>>     <<< Thread Index >>>

[PATCH] modified tmp variable is shown



A very minor bug.

0. In compose mode, press Ctrl-t to change Content-Type.
1. Type "application/octet-stream" for example.
2. Press Ctrl-t again.
3. Type "text/plain; charset=us-ascii"
4. You will be asked "Convert to us-ascii upon sending?"
5. Press y or n.
6. You will see a strange message:
 "Content-Type changed to Convert to us-ascii upon sending?."

-- 
tamo
Index: commands.c
===================================================================
RCS file: /home/roessler/cvs/mutt/commands.c,v
retrieving revision 3.27
diff -u -r3.27 commands.c
--- commands.c  26 Jan 2005 12:37:38 -0000      3.27
+++ commands.c  26 Jan 2005 13:17:01 -0000
@@ -910,12 +910,17 @@
 
   /* inform the user */
   
+  snprintf (tmp, sizeof (tmp), "%s/%s", TYPE (b), NONULL (b->subtype));
   if (type_changed)
     mutt_message (_("Content-Type changed to %s."), tmp);
-  else if (b->type == TYPETEXT && charset_changed)
+  if (b->type == TYPETEXT && charset_changed)
+  {
+    if (type_changed)
+      mutt_sleep (1);
     mutt_message (_("Character set changed to %s; %s."),
                  mutt_get_parameter ("charset", b->parameter),
                  b->noconv ? _("not converting") : _("converting"));
+  }
 
   b->force_charset |= charset_changed ? 1 : 0;