mirror of
https://github.com/golang/term.git
synced 2026-02-07 11:25:08 +03:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edd9fb7f4a | ||
|
|
88fcf87c53 | ||
|
|
f6de4a13df | ||
|
|
119f703398 | ||
|
|
7ae6be6d01 | ||
|
|
0edf009663 | ||
|
|
d974fe8326 |
2
go.mod
2
go.mod
@@ -2,4 +2,4 @@ module golang.org/x/term
|
||||
|
||||
go 1.17
|
||||
|
||||
require golang.org/x/sys v0.4.0
|
||||
require golang.org/x/sys v0.10.0
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1,2 +1,2 @@
|
||||
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
|
||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
|
||||
golang.org/x/sys v0.10.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