mirror of https://github.com/adamdruppe/arsd.git
fix clear bug on windows (thanks jared)
This commit is contained in:
parent
cc15188833
commit
2a0d6aeb15
|
@ -1106,11 +1106,13 @@ http://msdn.microsoft.com/en-us/library/windows/desktop/ms683193%28v=vs.85%29.as
|
||||||
doTermcap("cl");
|
doTermcap("cl");
|
||||||
} else version(Windows) {
|
} else version(Windows) {
|
||||||
// http://support.microsoft.com/kb/99261
|
// http://support.microsoft.com/kb/99261
|
||||||
|
flush();
|
||||||
|
|
||||||
DWORD c;
|
DWORD c;
|
||||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||||
DWORD conSize;
|
DWORD conSize;
|
||||||
GetConsoleScreenBufferInfo(hConsole, &csbi);
|
GetConsoleScreenBufferInfo(hConsole, &csbi);
|
||||||
|
conSize = csbi.dwSize.X * csbi.dwSize.Y;
|
||||||
COORD coordScreen;
|
COORD coordScreen;
|
||||||
FillConsoleOutputCharacterA(hConsole, ' ', conSize, coordScreen, &c);
|
FillConsoleOutputCharacterA(hConsole, ' ', conSize, coordScreen, &c);
|
||||||
FillConsoleOutputAttribute(hConsole, csbi.wAttributes, conSize, coordScreen, &c);
|
FillConsoleOutputAttribute(hConsole, csbi.wAttributes, conSize, coordScreen, &c);
|
||||||
|
|
Loading…
Reference in New Issue