vendor: update tonistiigi/vt100 to master@f9a4f7ef6531

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-07-05 16:47:43 +01:00
parent 1602b491f9
commit 86a5c77c2b
4 changed files with 15 additions and 4 deletions

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:])