mirror of https://github.com/adamdruppe/arsd.git
windows clear function impl
This commit is contained in:
parent
295cbeead5
commit
79f2d9f4a0
11
terminal.d
11
terminal.d
|
@ -1100,9 +1100,16 @@ http://msdn.microsoft.com/en-us/library/windows/desktop/ms683193%28v=vs.85%29.as
|
||||||
version(Posix) {
|
version(Posix) {
|
||||||
doTermcap("cl");
|
doTermcap("cl");
|
||||||
} else version(Windows) {
|
} else version(Windows) {
|
||||||
// TBD: copy the code from here and test it:
|
|
||||||
// http://support.microsoft.com/kb/99261
|
// http://support.microsoft.com/kb/99261
|
||||||
assert(0, "clear not yet implemented");
|
|
||||||
|
DWORD c;
|
||||||
|
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||||
|
DWORD conSize;
|
||||||
|
GetConsoleScreenBufferInfo(hConsole, &csbi);
|
||||||
|
COORD coordScreen;
|
||||||
|
FillConsoleOutputCharacterA(hConsole, ' ', conSize, coordScreen, &c);
|
||||||
|
FillConsoleOutputAttribute(hConsole, csbi.wAttributes, conSize, coordScreen, &c);
|
||||||
|
moveTo(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
_cursorX = 0;
|
_cursorX = 0;
|
||||||
|
|
Loading…
Reference in New Issue