You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Prompt.Input, if the user continues typing when the cursor reaches the last column of the last line in the buffer, Sharprompt crashes with:
Unhandled exception. System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. (Parameter 'top')
Actual value was 9001.
at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Sharprompt.Drivers.DefaultConsoleDriver.SetCursorPosition(Int32 left, Int32 top)
at Sharprompt.Internal.OffscreenBuffer.RenderToConsole()
at Sharprompt.Internal.RenderScope.Dispose()
at Sharprompt.Forms.FormRenderer.Render(Action`1 template)
at Sharprompt.Forms.FormBase`1.Start()
at Sharprompt.Prompt.Input[T](InputOptions`1 options)
at Sharprompt.Prompt.Input[T](Action`1 configure)
at Sharprompt.Prompt.Input[T](String message, Object defaultValue, String placeholder, IList`1 validators)
at Program.<Main>$(String[] args) in C:\Projects\CommandLineCrash\Program.cs:line 6
A minimal program reproducing this problem:
for(vari=0;i< Console.BufferHeight;i++){
Console.WriteLine();}
Sharprompt.Prompt.Input<string>("Type any character".PadRight(Console.BufferWidth -5));
I can reproduce the problem in the Windows Console and in Windows Terminal running either cmd.exe or PowerShell, but not in any of them when running bash through WSL 2.
The text was updated successfully, but these errors were encountered:
(If you paste a text snippet that is long enough to exceed the available space on the last line, this does not trigger the crash. Instead, it properly continues the prompt input on the next line, but still crashes if you then continue writing and reach the end of that new line.)
When using
Prompt.Input
, if the user continues typing when the cursor reaches the last column of the last line in the buffer, Sharprompt crashes with:A minimal program reproducing this problem:
I can reproduce the problem in the Windows Console and in Windows Terminal running either cmd.exe or PowerShell, but not in any of them when running bash through WSL 2.
The text was updated successfully, but these errors were encountered: