2015-09-27 06:41:05 +03:00
|
|
|
// +build windows
|
|
|
|
|
|
|
|
package readline
|
|
|
|
|
|
|
|
// get width of the terminal
|
|
|
|
func getWidth() int {
|
2015-09-29 12:49:58 +03:00
|
|
|
info, _ := GetConsoleScreenBufferInfo()
|
|
|
|
if info == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
return int(info.dwSize.x)
|
2015-09-27 06:41:05 +03:00
|
|
|
}
|