ANSI color bleeding

Issue #14 resolved
Former user created an issue

The client doesn't seem to register an end to printing and color and will continue to write in the previously registered color until it encounters a new one.

Replicateable in CLOK when you have a colored prompt indicator like smelly, then type any command like inventory or look at an object. It should revert to a default and color, which is usually white, but doesn't.

Comments (3)

  1. Andrew Baird

    It looks like \033[0m is not always recognized or not handled properly (Perhaps it doesn't persist after a line break?). For example, part of CLOK's raw login screen looks like this:

    \033[1;36m (c) Contrarium\033[0m

    \033[0mWelcome to CLOK!

    Type \033[1;36m/login [character] [password]\033[0m to log in as your character.

    In the above example, the word "Type" is incorrectly colorized bright cyan, while it should be the default color instead. Oddly enough, the words "Welcome to CLOK!" are colorized correctly. The same can be seen further down, as the "Check the website for more information:..." text is again supposed to be the default color but shows up bright magenta in bMUDclient.

  2. Andrew Baird

    Note I did a little testing by manually inserting a \033[0m at the beginning of a line and it correctly handled it, but then the next line was incorrectly colored again, so it looks to be an issue with \033[0m not persisting across multiple lines.

  3. Log in to comment