mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-21 13:04:57 +02:00
Merge branch 'L1-Prod' of https://github.com/PowerShell/Win32-OpenSSH.git
This commit is contained in:
commit
59a0cf6881
@ -55,6 +55,8 @@ int ScreenX;
|
||||
int ScreenY;
|
||||
int ScrollTop;
|
||||
int ScrollBottom;
|
||||
int LastCursorX;
|
||||
int LastCursorY;
|
||||
|
||||
char *pSavedScreen = NULL;
|
||||
static COORD ZeroCoord = {0,0};
|
||||
@ -1141,7 +1143,7 @@ void ConScrollUp(int topline,int botline)
|
||||
Fill.Attributes = ConsoleInfo.wAttributes;
|
||||
Fill.Char.AsciiChar = ' ';
|
||||
|
||||
ScrollConsoleScreenBuffer( hOutputConsole,
|
||||
BOOL bRet = ScrollConsoleScreenBuffer( hOutputConsole,
|
||||
&ScrollRect,
|
||||
&ClipRect,
|
||||
destination,
|
||||
@ -1185,7 +1187,7 @@ void ConScrollDown(int topline,int botline)
|
||||
Fill.Attributes = ConsoleInfo.wAttributes;
|
||||
Fill.Char.AsciiChar = ' ';
|
||||
|
||||
ScrollConsoleScreenBuffer( hOutputConsole,
|
||||
BOOL bRet = ScrollConsoleScreenBuffer( hOutputConsole,
|
||||
&ScrollRect,
|
||||
NULL,
|
||||
destination,
|
||||
@ -1224,8 +1226,20 @@ void ConSetCursorPosition(int x, int y)
|
||||
Coord.X = (short)(x);
|
||||
Coord.Y = (short)(y);
|
||||
|
||||
if ((y > ConsoleInfo.dwSize.Y - 1) && y > LastCursorY) {
|
||||
for(int n = LastCursorY; n < y; n++)
|
||||
GoToNextLine();
|
||||
}
|
||||
|
||||
if (y >= ConsoleInfo.dwSize.Y) {
|
||||
Coord.Y = ConsoleInfo.dwSize.Y - 1;
|
||||
}
|
||||
|
||||
if (!SetConsoleCursorPosition(hOutputConsole, Coord))
|
||||
rc = GetLastError();
|
||||
|
||||
LastCursorX = x;
|
||||
LastCursorY = y;
|
||||
}
|
||||
|
||||
BOOL ConChangeCursor( CONSOLE_CURSOR_INFO *pCursorInfo )
|
||||
|
Loading…
x
Reference in New Issue
Block a user