windows bug fix 02

This commit is contained in:
2024-09-29 21:52:17 +02:00
parent dd8f1fbc1f
commit b2b5c9c00d
3 changed files with 7 additions and 6 deletions
+2 -5
View File
@@ -9,6 +9,7 @@ import (
"runtime"
"strings"
"github.com/nathan-fiscaletti/consolesize-go"
"github.com/orus-dev/osui/colors"
"golang.org/x/term"
)
@@ -174,9 +175,5 @@ func LogicValueInt(b bool, _if, _else int) int {
}
func GetTerminalSize() (int, int) {
w, h, err := term.GetSize(int(os.Stdin.Fd()))
if err != nil {
panic(err)
}
return w, h
return consolesize.GetConsoleSize()
}