Handes the case where mono will clear the screen on a Console.ReadKey.
Console app output is cleared when Console.ReadKey is used
.NET Core console projects are OK
Only affects console projects run with Mono. Can reproduce the problem in the Terminal directly by running mono console-project.exe
XtermSharp is erasing the display since it seems to get an escape code to do that - callstack - ESC (27) [ (91) number of rows (50=2 => clear entire screen) J (74 = Erase in display) - Mono asks the terminal host for the cursor position, if none is returned it sends a clear display escape code.
There appeared to be 3 issues, the first being that the code path when querying device status never hits any of the methods that return a value. collect always appears to be an empty string (or might be a "?" for different shells). The second issue is that the wrong string is returned, looks like a copy from javascript template literals including an extra "$". The 3rd issue is that xterm.js "OnData" is not implemented.
Handes the case where mono will clear the screen on a Console.ReadKey.
Console app output is cleared when Console.ReadKey is used
mono console-project.exe
There appeared to be 3 issues, the first being that the code path when querying device status never hits any of the methods that return a value.
collect
always appears to be an empty string (or might be a "?" for different shells). The second issue is that the wrong string is returned, looks like a copy from javascript template literals including an extra "$". The 3rd issue is that xterm.js "OnData" is not implemented.