mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
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:
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:])
|
||||
|
Reference in New Issue
Block a user