summaryrefslogtreecommitdiff
path: root/lisp/term.el
diff options
context:
space:
mode:
authorVasilij Schneidermann <v.schneidermann@gmail.com>2016-04-21 18:59:37 +0300
committerEli Zaretskii <eliz@gnu.org>2016-04-21 18:59:37 +0300
commitcaa31fcaa2fc7b05e411c8155d7641e7660a735a (patch)
tree1219b1f77a82c0c67cd9a0d188ab129ca465b3fa /lisp/term.el
parent928f51945d57a4ebb44ee2e8f1c2403b227c695e (diff)
downloademacs-caa31fcaa2fc7b05e411c8155d7641e7660a735a.tar.gz
Support absolute column movement in 'ansi-term'
* lisp/term.el (term-handle-ansi-escape): Handle the "\E[G" sequence for absolute column movement. (Bug#23303)
Diffstat (limited to 'lisp/term.el')
-rw-r--r--lisp/term.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/term.el b/lisp/term.el
index 3520a3938e3..2d5d3e96000 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -3260,6 +3260,10 @@ See `term-prompt-regexp'."
;; \E[D - cursor left (terminfo: cub)
((eq char ?D)
(term-move-columns (- (max 1 term-terminal-parameter))))
+ ;; \E[G - cursor motion to absolute column (terminfo: hpa)
+ ((eq char ?G)
+ (term-move-columns (- (max 0 (min term-width term-terminal-parameter))
+ (term-current-column))))
;; \E[J - clear to end of screen (terminfo: ed, clear)
((eq char ?J)
(term-erase-in-display term-terminal-parameter))