Revert "term: make compilable with v2 on windows"
parent
0f1f724a91
commit
b4561fa814
|
@ -37,6 +37,7 @@
|
||||||
+ require explicit C.fn definitions, add all missing definitions
|
+ require explicit C.fn definitions, add all missing definitions
|
||||||
+ string.index() ?int
|
+ string.index() ?int
|
||||||
+ new AST based parser
|
+ new AST based parser
|
||||||
|
+ make V2 compile itself
|
||||||
- wrap up memory management
|
- wrap up memory management
|
||||||
- remove all compiler memory leaks
|
- remove all compiler memory leaks
|
||||||
- doom.v
|
- doom.v
|
||||||
|
|
|
@ -22,7 +22,7 @@ fn C.GetConsoleScreenBufferInfo(handle os.HANDLE, info &CONSOLE_SCREEN_BUFFER_IN
|
||||||
// get_terminal_size returns a number of colums and rows of terminal window.
|
// get_terminal_size returns a number of colums and rows of terminal window.
|
||||||
pub fn get_terminal_size() (int, int) {
|
pub fn get_terminal_size() (int, int) {
|
||||||
if is_atty(1) > 0 && os.getenv('TERM') != 'dumb' {
|
if is_atty(1) > 0 && os.getenv('TERM') != 'dumb' {
|
||||||
info := C.CONSOLE_SCREEN_BUFFER_INFO{}
|
info := CONSOLE_SCREEN_BUFFER_INFO{}
|
||||||
|
|
||||||
if C.GetConsoleScreenBufferInfo(C.GetStdHandle(C.STD_OUTPUT_HANDLE), &info) {
|
if C.GetConsoleScreenBufferInfo(C.GetStdHandle(C.STD_OUTPUT_HANDLE), &info) {
|
||||||
columns := int(info.srWindow.Right - info.srWindow.Left + 1)
|
columns := int(info.srWindow.Right - info.srWindow.Left + 1)
|
||||||
|
|
Loading…
Reference in New Issue