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 ScreenY;
|
||||||
int ScrollTop;
|
int ScrollTop;
|
||||||
int ScrollBottom;
|
int ScrollBottom;
|
||||||
|
int LastCursorX;
|
||||||
|
int LastCursorY;
|
||||||
|
|
||||||
char *pSavedScreen = NULL;
|
char *pSavedScreen = NULL;
|
||||||
static COORD ZeroCoord = {0,0};
|
static COORD ZeroCoord = {0,0};
|
||||||
@ -1141,7 +1143,7 @@ void ConScrollUp(int topline,int botline)
|
|||||||
Fill.Attributes = ConsoleInfo.wAttributes;
|
Fill.Attributes = ConsoleInfo.wAttributes;
|
||||||
Fill.Char.AsciiChar = ' ';
|
Fill.Char.AsciiChar = ' ';
|
||||||
|
|
||||||
ScrollConsoleScreenBuffer( hOutputConsole,
|
BOOL bRet = ScrollConsoleScreenBuffer( hOutputConsole,
|
||||||
&ScrollRect,
|
&ScrollRect,
|
||||||
&ClipRect,
|
&ClipRect,
|
||||||
destination,
|
destination,
|
||||||
@ -1185,7 +1187,7 @@ void ConScrollDown(int topline,int botline)
|
|||||||
Fill.Attributes = ConsoleInfo.wAttributes;
|
Fill.Attributes = ConsoleInfo.wAttributes;
|
||||||
Fill.Char.AsciiChar = ' ';
|
Fill.Char.AsciiChar = ' ';
|
||||||
|
|
||||||
ScrollConsoleScreenBuffer( hOutputConsole,
|
BOOL bRet = ScrollConsoleScreenBuffer( hOutputConsole,
|
||||||
&ScrollRect,
|
&ScrollRect,
|
||||||
NULL,
|
NULL,
|
||||||
destination,
|
destination,
|
||||||
@ -1224,8 +1226,20 @@ void ConSetCursorPosition(int x, int y)
|
|||||||
Coord.X = (short)(x);
|
Coord.X = (short)(x);
|
||||||
Coord.Y = (short)(y);
|
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))
|
if (!SetConsoleCursorPosition(hOutputConsole, Coord))
|
||||||
rc = GetLastError();
|
rc = GetLastError();
|
||||||
|
|
||||||
|
LastCursorX = x;
|
||||||
|
LastCursorY = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL ConChangeCursor( CONSOLE_CURSOR_INFO *pCursorInfo )
|
BOOL ConChangeCursor( CONSOLE_CURSOR_INFO *pCursorInfo )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user