Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/fsi/console.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace FSharp.Compiler.Interactive
open System
open System.Text
open System.Collections.Generic
open System.Runtime.InteropServices
open FSharp.Compiler.DiagnosticsLogger

type internal Style =
Expand Down Expand Up @@ -242,6 +243,8 @@ type internal Anchor =
type internal ReadLineConsole() =
let history = new History()

static let supportsBufferHeightChange = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)

let mutable complete: (string option * string -> seq<string>) =
fun (_s1, _s2) -> Seq.empty

Expand Down Expand Up @@ -347,7 +350,11 @@ type internal ReadLineConsole() =

if Console.CursorLeft + charSize > Utils.bufferWidth () then
if Console.CursorTop + 1 = Console.BufferHeight then
Console.BufferHeight <- Console.BufferHeight + 1
if supportsBufferHeightChange then
Console.BufferHeight <- Console.BufferHeight + 1
else
Console.WriteLine()
anchor <- { anchor with top = (anchor).top - 1 }

Cursor.Move(0)

Expand Down