Fix absolute cursor positioning in term.el

* lisp/term.el (term-handle-ansi-escape): Cursor Character
Absolute uses one-based column numbers; adjust to Emacs's
zero-based column numbering.  (Bug#80458)
This commit is contained in:
Eli Zaretskii
2026-02-22 12:39:12 +02:00
parent 923aac2e4e
commit 81168edb10

View File

@@ -3698,7 +3698,7 @@ color is unset in the terminal state."
(term-move-columns (- (max 1 (car params)))))
;; \E[G - cursor motion to absolute column (terminfo: hpa)
((eq char ?G)
(term-move-columns (- (max 0 (min term-width (car params)))
(term-move-columns (- (max 0 (1- (min term-width (car params))))
(term-current-column))))
;; \E[J - clear to end of screen (terminfo: ed, clear)
((eq char ?J)