Save cursor position before printing image to fix text being cut off
This commit is contained in:
parent
812d977fcc
commit
3ed2a91cbc
1 changed files with 2 additions and 1 deletions
|
@ -229,11 +229,12 @@ func CutePrintEnd() {
|
||||||
CuteNewLine()
|
CuteNewLine()
|
||||||
}
|
}
|
||||||
if usepng {
|
if usepng {
|
||||||
|
fmt.Print("\x1b7")
|
||||||
fmt.Printf("\x1b[%dA", logoIndex)
|
fmt.Printf("\x1b[%dA", logoIndex)
|
||||||
fmt.Printf("\x1b]1337;File=inline=1;width=%d;height=%d:", pngWidth, pngHeight)
|
fmt.Printf("\x1b]1337;File=inline=1;width=%d;height=%d:", pngWidth, pngHeight)
|
||||||
enc := base64.NewEncoder(base64.StdEncoding, os.Stdout)
|
enc := base64.NewEncoder(base64.StdEncoding, os.Stdout)
|
||||||
enc.Write(images.DistroImages[getcustomizeddistro()])
|
enc.Write(images.DistroImages[getcustomizeddistro()])
|
||||||
enc.Close()
|
enc.Close()
|
||||||
fmt.Println("\a")
|
fmt.Print("\a\x1b8")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue