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

fix term_windows.v

This commit is contained in:
Alexander Medvednikov 2020-02-07 23:16:31 +01:00
parent e9827f5a34
commit ea9961a8fb

View File

@ -25,8 +25,8 @@ pub fn get_terminal_size() (int, int) {
info := 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 := (info.srWindow.Right - info.srWindow.Left + 1) as int columns := int(info.srWindow.Right - info.srWindow.Left + 1)
rows := (info.srWindow.Bottom - info.srWindow.Top + 1) as int rows := int(info.srWindow.Bottom - info.srWindow.Top + 1)
return columns, rows return columns, rows
} }
} }