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
I have a test application where the Prompt.Select is located in a loop and different actions are performed depending on the actual selection. If the actions also write messages to the console, the Prompt.Select text is displayed somewehere in the midddle of the console messages generated during the execution of the different actions. For the first iteration is all ok, but after that the prompt select text is not at the last line anymore. I tried to call Console.SetCursorPosition(0, Console.CursorTop) before Prompt.Select() , but it does not help....
The text was updated successfully, but these errors were encountered:
@shibayan By making the following change in the code, the Prompt.Select displays the message at the right position, after the application-generated messages:
public RenderScope(OffscreenBuffer offscreenBuffer, IConsoleDriver consoleDriver, int cursorBottom, int writtenLineCount)
{
_offscreenBuffer = offscreenBuffer;
_consoleDriver = consoleDriver;
// old
//_cursorBottom = Math.Min(cursorBottom, _consoleDriver.WindowHeight - 1);
// new
_cursorBottom = cursorBottom;
_writtenLineCount = Math.Min(writtenLineCount, _consoleDriver.WindowHeight - 1);
_offscreenBuffer.ClearBuffer();
}
I have a test application where the Prompt.Select is located in a loop and different actions are performed depending on the actual selection. If the actions also write messages to the console, the Prompt.Select text is displayed somewehere in the midddle of the console messages generated during the execution of the different actions. For the first iteration is all ok, but after that the prompt select text is not at the last line anymore. I tried to call Console.SetCursorPosition(0, Console.CursorTop) before Prompt.Select() , but it does not help....
The text was updated successfully, but these errors were encountered: