1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

term: implement term.clear() for windows (#8650)

This commit is contained in:
Swastik Baranwal
2021-02-09 17:55:31 +05:30
committed by GitHub
parent 5308b63a01
commit 6de78ecb59
3 changed files with 65 additions and 8 deletions

View File

@@ -119,11 +119,3 @@ fn supports_escape_sequences(fd int) bool {
return is_atty(fd) > 0
}
}
// clear clears current terminal screen.
pub fn clear() {
$if !windows {
print('\x1b[2J')
print('\x1b[H')
}
}