- Create file.fsx containing the following
System.Console.WriteLine "BEFORE CursorLeft"
let x = System.Console.CursorLeft
System.Console.WriteLine "AFTER CursorLeft"
- Compile ("fsharpc file.fsx")
- Run ("mono file.exe")
- Expected: Two lines of output
- Observed: The screen clears after the first WriteLine.
This is the cause of https://github.com/fsharp/fsharp/issues/140. We're running Mono on Ubuntu, accessing it via an SSH connection from Windows (not sure if that matters).
"stty" reports the following terminal settings, perhaps this is relevant.
speed 38400 baud; line = 0;
erase = ^H;
-echoe -echok -echoctl -echoke
Created attachment 4092 [details]
Can you test this patch?
That didn't fix it - but it did change the problem so that the "clear screen" now occurs earlier. Also, it changed a bunch of Mono tools (mcs and others I think) so that they also cleared the screen.
This line looks likely to be the one causing the "clear"
and this is the place where "noGetPosition" is becoming true:
if that helps