mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Fix column double counting in term.el (Bug#31662)
* lisp/term.el (term-emulate-terminal): Invalidate `term-current-column' after deleting overwritten text.
This commit is contained in:
parent
6a672b7925
commit
9ac76456eb
2 changed files with 9 additions and 1 deletions
|
|
@ -2904,7 +2904,8 @@ See `term-prompt-regexp'."
|
|||
(when (not (or (eobp) term-insert-mode))
|
||||
(let ((pos (point)))
|
||||
(term-move-columns columns)
|
||||
(delete-region pos (point))))
|
||||
(delete-region pos (point))
|
||||
(setq term-current-column nil)))
|
||||
;; In insert mode if the current line
|
||||
;; has become too long it needs to be
|
||||
;; chopped off.
|
||||
|
|
|
|||
|
|
@ -89,6 +89,13 @@ first line\r_next line\r\n"))
|
|||
"\e[2;1Hc"
|
||||
"\e[1;2Hb"
|
||||
"\e[1;1Ha") "" t))))
|
||||
(should (equal "abcde j"
|
||||
(term-test-screen-from-input
|
||||
10 12 '("abcdefghij"
|
||||
"\e[H" ;move back to point-min
|
||||
"abcde"
|
||||
" j"))))
|
||||
|
||||
;; Relative positioning.
|
||||
(should (equal "ab\ncd"
|
||||
(term-test-screen-from-input
|
||||
|
|
|
|||
Loading…
Reference in a new issue