# File lib/highline/system_extensions.rb, line 115 def terminal_size format = 'SSSSSssssSS' buf = ([0] * format.size).pack(format) stdout_handle = WinAPI.GetStdHandle(0xFFFFFFF5) WinAPI.GetConsoleScreenBufferInfo(stdout_handle, buf) _, _, _, _, _, left, top, right, bottom, _, _ = buf.unpack(format) return right - left + 1, bottom - top + 1 end