diff --git a/src/tui/light.go b/src/tui/light.go index 3e618079..593b2be6 100644 --- a/src/tui/light.go +++ b/src/tui/light.go @@ -256,9 +256,12 @@ func (r *LightRenderer) move(y int, x int) { } else if r.y > y { r.csi(fmt.Sprintf("%dA", r.y-y)) } - r.stderr("\r") - if x > 0 { - r.csi(fmt.Sprintf("%dC", x)) + // Use CHA instead of CR+CUF; Zellij misplaces the next character when + // CUF moves the cursor over cells that have not been written to yet. + if x == 0 { + r.stderr("\r") + } else { + r.csi(fmt.Sprintf("%dG", x+1)) } r.y = y r.x = x