From 2c232ce70919fb5840fce7509a05c166f3266a51 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 16 Aug 2023 19:04:15 +0530 Subject: [PATCH] kitten icat: Fix image being displayed one cell to the right when using both --place and --unicode-placeholder Fixes #6556 --- docs/changelog.rst | 2 ++ kittens/icat/transmit.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 7bce1dc24..4d8b12999 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -49,6 +49,8 @@ Detailed list of changes - kitten @ ls: Allow limiting output to matched windows/tabs (:iss:`6520`) +- kitten icat: Fix image being displayed one cell to the right when using both ``--place`` and ``--unicode-placeholder`` (:iss:`6556`) + - Remote control: Allow using a random TCP port as the remote control socket and also allow using TCP sockets in :opt:`listen_on` - unicode_input kitten: Add an option to specify the startup tab (:iss:`6552`) diff --git a/kittens/icat/transmit.go b/kittens/icat/transmit.go index c66e8f92b..dfdb6bd74 100644 --- a/kittens/icat/transmit.go +++ b/kittens/icat/transmit.go @@ -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) }