vendor: github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531

full diff: 8066bb9726...f9a4f7ef65

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-07-17 10:40:40 +02:00
parent ff2c8da803
commit 2666bd6996
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
4 changed files with 15 additions and 4 deletions

2
go.mod
View File

@ -140,7 +140,7 @@ require (
github.com/theupdateframework/notary v0.6.1 // indirect
github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb // 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/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect

4
go.sum
View File

@ -485,8 +485,8 @@ github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb h1:uUe8rNyVXM8mo
github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb/go.mod h1:SxX/oNQ/ag6Vaoli547ipFK9J7BZn5JqJG0JE8lf8bA=
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/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME=
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=

View File

@ -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
View File

@ -687,7 +687,7 @@ github.com/tonistiigi/fsutil/types
# 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/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb