mirror of
https://github.com/golang/term.git
synced 2026-02-07 11:25:08 +03:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f413282cd8 | ||
|
|
19e73c2b80 | ||
|
|
edd9fb7f4a | ||
|
|
88fcf87c53 | ||
|
|
f6de4a13df |
2
go.mod
2
go.mod
@@ -2,4 +2,4 @@ module golang.org/x/term
|
||||
|
||||
go 1.17
|
||||
|
||||
require golang.org/x/sys v0.8.0
|
||||
require golang.org/x/sys v0.12.0
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1,2 +1,2 @@
|
||||
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
||||
@@ -60,7 +60,7 @@ func restore(fd int, state *State) error {
|
||||
func getSize(fd int) (width, height int, err error) {
|
||||
ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
|
||||
if err != nil {
|
||||
return -1, -1, err
|
||||
return 0, 0, err
|
||||
}
|
||||
return int(ws.Col), int(ws.Row), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user