diff --git a/go.mod b/go.mod index 230758e5..8d2033e5 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 5e3bb47d..c1369c3b 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/vendor/github.com/tonistiigi/vt100/vt100.go b/vendor/github.com/tonistiigi/vt100/vt100.go index 5bf7df96..ab6ab020 100644 --- a/vendor/github.com/tonistiigi/vt100/vt100.go +++ b/vendor/github.com/tonistiigi/vt100/vt100.go @@ -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:]) diff --git a/vendor/modules.txt b/vendor/modules.txt index c82d5eef..2d9da2a9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -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