vendor: github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531
fix possible panix on fast resizing
full diff: 8066bb9726...f9a4f7ef65
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
bd6cadffb0
commit
87dd1de046
4 changed files with 15 additions and 4 deletions
|
@ -181,7 +181,7 @@ require (
|
|||
github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb // indirect
|
||||
github.com/tonistiigi/go-actions-cache v0.0.0-20220404170428-0bdeb6e1eac7 // indirect
|
||||
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect
|
||||
github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f // indirect
|
||||
github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 // indirect
|
||||
github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b // indirect
|
||||
github.com/zmap/zcrypto v0.0.0-20210511125630-18f1e0152cfc // indirect
|
||||
github.com/zmap/zlint/v3 v3.1.0 // indirect
|
||||
|
|
|
@ -1370,8 +1370,8 @@ github.com/tonistiigi/go-archvariant v1.0.0 h1:5LC1eDWiBNflnTF1prCiX09yfNHIxDC/a
|
|||
github.com/tonistiigi/go-archvariant v1.0.0/go.mod h1:TxFmO5VS6vMq2kvs3ht04iPXtu2rUT/erOnGFYfk5Ho=
|
||||
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0=
|
||||
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk=
|
||||
github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f h1:DLpt6B5oaaS8jyXHa9VA4rrZloBVPVXeCtrOsrFauxc=
|
||||
github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc=
|
||||
github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 h1:Y/M5lygoNPKwVNLMPXgVfsRT40CSFKXCxuU8LoHySjs=
|
||||
github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc=
|
||||
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
|
||||
github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
|
||||
github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
|
||||
|
|
11
vendor/github.com/tonistiigi/vt100/vt100.go
generated
vendored
11
vendor/github.com/tonistiigi/vt100/vt100.go
generated
vendored
|
@ -181,6 +181,13 @@ func (v *VT100) UsedHeight() int {
|
|||
}
|
||||
|
||||
func (v *VT100) Resize(y, x int) {
|
||||
// add some minimal defaults to handle zero and negative values
|
||||
if x < 6 {
|
||||
x = 6
|
||||
}
|
||||
if y < 1 {
|
||||
y = 1
|
||||
}
|
||||
if y > v.Height {
|
||||
n := y - v.Height
|
||||
for row := 0; row < n; row++ {
|
||||
|
@ -329,6 +336,10 @@ func (v *VT100) advance() {
|
|||
}
|
||||
|
||||
func (v *VT100) scrollIfNeeded() {
|
||||
if v.Cursor.X >= v.Width {
|
||||
v.Cursor.X = 0
|
||||
v.Cursor.Y++
|
||||
}
|
||||
if v.Cursor.Y >= v.Height {
|
||||
first := v.Content[0]
|
||||
copy(v.Content, v.Content[1:])
|
||||
|
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
@ -1002,7 +1002,7 @@ github.com/tonistiigi/go-archvariant
|
|||
# github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea
|
||||
## explicit
|
||||
github.com/tonistiigi/units
|
||||
# github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f
|
||||
# github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531
|
||||
## explicit; go 1.12
|
||||
github.com/tonistiigi/vt100
|
||||
# github.com/vbatts/tar-split v0.11.3
|
||||
|
|
Loading…
Add table
Reference in a new issue