mirror of
https://github.com/junegunn/fzf
synced 2026-07-17 16:03:17 +00:00
Use CHA for absolute horizontal cursor movement
Related: - #4858 - https://github.com/zellij-org/zellij/issues/5370
This commit is contained in:
+6
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user