The correct behavior would be to recognize \r as part of the line separator, so instead of: ESC [0m ESC [0;1;41m CR [0m LF the output should be: ESC [0m CR LF but I have to search a little more for the right place to make this change. Have a nice day, Eduard