kitten icat: Fix image being displayed one cell to the right when using both --place and --unicode-placeholder

Fixes #6556
This commit is contained in:
Kovid Goyal
2023-08-16 19:04:15 +05:30
parent b276b563c5
commit 2c232ce709
2 changed files with 3 additions and 1 deletions

View File

@@ -267,7 +267,7 @@ func write_unicode_placeholder(imgd *image_data) {
id_char := string(images.NumberToDiacritic[(imgd.image_id>>24)&255])
for r := 0; r < imgd.height_cells; r++ {
if imgd.move_to.x > 0 {
fmt.Printf("\x1b[%dC", imgd.move_to.x)
fmt.Printf("\x1b[%dC", imgd.move_to.x-1)
} else {
os.Stdout.WriteString(prefix)
}