Bug#347336: gnome-mud: Resets ansi color each time it writes to the terminal.

Aredhel aredhel at verizon.net
Tue Jan 10 06:35:48 UTC 2006


Package: gnome-mud
Version: 0.10.7-1
Severity: normal


Each time the the client receives a packet from the mud it wites it to
the terminal, then it writes "\e[0m", which clears the text color.

When a colored string from the mud gets split across two packets the
part of the string in the 2nd packet is rendered in white instead of its
intended color.

The attached patch limits the reset to those times when it is really needed.
-Eric Armstrong

--- gnome-mud-0.10.7/src/window.c       2005-04-05 10:57:25.000000000 -0400
+++ gnome-mud-0.10.7-patched/src/window.c       2006-01-08
03:07:03.000000000 -0500
@@ -121,7 +121,15 @@
     }
 
        terminal_feed(text_widget, message);
-       terminal_feed(text_widget, "\e[0m");
+       switch (colortype)
+       {
+           case MESSAGE_SENT:
+           case MESSAGE_ERR:
+           case MESSAGE_SYSTEM:
+               terminal_feed(text_widget, "\e[0m");
+           default:
+               break;
+       }
 }
 
 static void str_replace (char *buf, const char *s, const char *repl)








More information about the Pkg-gnome-maintainers mailing list