File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -992,7 +992,25 @@ private void MoveCursor(int newCursor)
992992 return ;
993993 }
994994
995- _console . SetCursorPosition ( point . X , point . Y ) ;
995+ if ( point . Y == _console . BufferHeight )
996+ {
997+ // The cursor top exceeds the buffer height, so adjust the initial cursor
998+ // position and the to-be-set cursor position for scrolling up the buffer.
999+ _initialY -= 1 ;
1000+ point . Y -= 1 ;
1001+
1002+ // Insure the cursor is on the last line of the buffer prior
1003+ // to issuing a newline to scroll the buffer.
1004+ _console . SetCursorPosition ( point . X , point . Y ) ;
1005+
1006+ // Scroll up the buffer by 1 line.
1007+ _console . Write ( "\n " ) ;
1008+ }
1009+ else
1010+ {
1011+ _console . SetCursorPosition ( point . X , point . Y ) ;
1012+ }
1013+
9961014 _current = newCursor ;
9971015 }
9981016
You can’t perform that action at this time.
0 commit comments