1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-03 14:10:47 -08:00

Make erase-in-line conform to ANSI spec in term

When handling \e[<N>K escape sequences, we're supposed to erase both to
the left _and_ to the right of the cursor when N is two.

* lisp/term.el (term-erase-in-line): make condition check more correct
This commit is contained in:
Daniel Colascione 2025-03-07 11:07:12 -08:00
parent af828499c6
commit 4ea07cc4b4

View file

@ -4040,7 +4040,7 @@ all pending output has been dealt with."))
'(term-line-wrap t rear-nonsticky t)))))
(defun term-erase-in-line (kind)
(when (= kind 1) ;; erase left of point
(when (>= kind 1) ;; erase left of point
(let ((cols (term-horizontal-column)) (saved-point (point)))
(term-vertical-motion 0)
(delete-region (point) saved-point)