Save cursor position before printing image to fix text being cut off

This commit is contained in:
nea 2023-02-04 14:03:55 +01:00
parent 812d977fcc
commit 3ed2a91cbc
No known key found for this signature in database
GPG key ID: AA563E93EB628D91

View file

@ -229,11 +229,12 @@ func CutePrintEnd() {
CuteNewLine()
}
if usepng {
fmt.Print("\x1b7")
fmt.Printf("\x1b[%dA", logoIndex)
fmt.Printf("\x1b]1337;File=inline=1;width=%d;height=%d:", pngWidth, pngHeight)
enc := base64.NewEncoder(base64.StdEncoding, os.Stdout)
enc.Write(images.DistroImages[getcustomizeddistro()])
enc.Close()
fmt.Println("\a")
fmt.Print("\a\x1b8")
}
}