aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2026-02-22 12:39:12 +0200
committerEli Zaretskii2026-02-22 12:39:12 +0200
commit81168edb1075a88ec0a3be27abedf8bcbbfa7c78 (patch)
treef03658d8d61789e438af25cc5239feded2b71ed3
parent923aac2e4ec76b51891ba711c44ee08f7211ea2a (diff)
downloademacs-81168edb1075a88ec0a3be27abedf8bcbbfa7c78.tar.gz
emacs-81168edb1075a88ec0a3be27abedf8bcbbfa7c78.zip
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)
-rw-r--r--lisp/term.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/term.el b/lisp/term.el
index 9ac77730350..15ba310a73a 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -3698,7 +3698,7 @@ color is unset in the terminal state."
3698 (term-move-columns (- (max 1 (car params))))) 3698 (term-move-columns (- (max 1 (car params)))))
3699 ;; \E[G - cursor motion to absolute column (terminfo: hpa) 3699 ;; \E[G - cursor motion to absolute column (terminfo: hpa)
3700 ((eq char ?G) 3700 ((eq char ?G)
3701 (term-move-columns (- (max 0 (min term-width (car params))) 3701 (term-move-columns (- (max 0 (1- (min term-width (car params))))
3702 (term-current-column)))) 3702 (term-current-column))))
3703 ;; \E[J - clear to end of screen (terminfo: ed, clear) 3703 ;; \E[J - clear to end of screen (terminfo: ed, clear)
3704 ((eq char ?J) 3704 ((eq char ?J)