Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f94347

Browse files
soimortlatkin
authored andcommitted
Set boundary for Console.CursorTop
1 parent25d8ea0 commit4f94347

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/fsharp/fsi/console.fs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module Utils =
131131
typeCursor=
132132
static memberResetTo(top,left)=
133133
Utils.guard(fun()->
134-
Console.CursorTop<- top;
134+
Console.CursorTop<-mintop(Console.BufferHeight-1);
135135
Console.CursorLeft<- left)
136136
static memberMove(inset,delta)=
137137
letposition= Console.CursorTop*(Console.BufferWidth- inset)+(Console.CursorLeft- inset)+ delta
@@ -216,6 +216,7 @@ type ReadLineConsole() =
216216
if currLeft< x.Insetthen
217217
if currLeft=0then Console.Write(if promptthen x.Prompt2else String(' ',x.Inset))
218218
Utils.guard(fun()->
219+
Console.CursorTop<- min Console.CursorTop(Console.BufferHeight-1);
219220
Console.CursorLeft<- x.Inset);
220221

221222
// The caller writes the primary prompt. If we are reading the 2nd and subsequent lines of the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp