1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-10 08:52:40 -07:00

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)