Debugger: Support ANSI colours in the Interpreter window.

This patch adds a parser for ANSI terminal escape sequences, enabling e.g.
interaction with colorized GDB prompts and scripts.
This commit is contained in:
Robert Xiao 2022-04-21 17:22:44 -07:00
parent 47f76c78d6
commit f9e234738d
3 changed files with 356 additions and 9 deletions

View file

@ -69,14 +69,8 @@ public abstract class AbstractDebuggerWrappedConsoleConnection<T extends TargetO
if (os == null) {
return;
}
/**
* NB: yes, the extra space is lame... The InterpreterPanel's repositionScrollPane
* method subtracts 1 from the text length to compute the new position causing it to
* scroll to the last character printed. We want it to scroll to the next line, so...
*/
try {
os.write(out);
os.write(' ');
}
catch (IOException e) {
Msg.error(this, "Cannot write to interpreter window: ", e);