You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that the OS and configuration doesn't matter.
Here is a test case to reproduce the issue:
`
static void testIncompleEscapeSequence()
{
System.out.print("normal text\u001b");
System.out.flush();
try {
Thread.sleep(2000l);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("[0;31m red text\u001b[m normal text");
And spent some time digging into it.
I know where the problem is, and thinking of a low-impact way to fix it.
But I am a bit busy (until about half of August).
It will be in the back of my mind, of I get some time (or I have some sudden idea :-)
I don't want a big change, as this should be a pretty rare occurrence, and even when it happens, it is not critical.
Dear Mihai,
I noticed that sometime some escape codes are not processed by the console.
To reproduce you can execute allTest256() 100 times in a for loop : https://github.com/mihnita/ansi-econsole/blob/28e93303e52dc3b5649f8a8af352c95a4363d1f5/AnsiConTest/src/AnsiConTest.java#L146.
After investigation it seems that it comes from https://github.com/mihnita/ansi-econsole/blob/28e93303e52dc3b5649f8a8af352c95a4363d1f5/AnsiConsole/src/mnita/ansiconsole/participants/AnsiConsoleStyleListener.java#L209
When an incomplete escape code is at the end of the text argument, the position is not detected.
I think that incomplete escape sequences at end of text should be saved and prepended to the beginning of text on next call.
The text was updated successfully, but these errors were encountered: