File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ namespace FSharp.Compiler.Interactive
55open System
66open System.Text
77open System.Collections .Generic
8+ open System.Runtime .InteropServices
89open FSharp.Compiler .DiagnosticsLogger
910
1011type internal Style =
@@ -242,6 +243,8 @@ type internal Anchor =
242243type internal ReadLineConsole () =
243244 let history = new History()
244245
246+ static let supportsBufferHeightChange = RuntimeInformation.IsOSPlatform( OSPlatform.Windows)
247+
245248 let mutable complete : ( string option * string -> seq < string >) =
246249 fun ( _s1 , _s2 ) -> Seq.empty
247250
@@ -347,7 +350,11 @@ type internal ReadLineConsole() =
347350
348351 if Console.CursorLeft + charSize > Utils.bufferWidth () then
349352 if Console.CursorTop + 1 = Console.BufferHeight then
350- Console.BufferHeight <- Console.BufferHeight + 1
353+ if supportsBufferHeightChange then
354+ Console.BufferHeight <- Console.BufferHeight + 1
355+ else
356+ Console.WriteLine()
357+ anchor <- { anchor with top = ( anchor). top - 1 }
351358
352359 Cursor.Move( 0 )
353360
You can’t perform that action at this time.
0 commit comments