From: Daniel Colascione Date: Fri, 7 Mar 2025 19:07:12 +0000 (-0800) Subject: Make erase-in-line conform to ANSI spec in term X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7f4f3789ea646fdbfc07a41c8f175bfd61811f3a;p=emacs.git Make erase-in-line conform to ANSI spec in term When handling \e[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 (cherry picked from commit 4ea07cc4b4a676a5f8094d565cd3cea89e6ec77d) --- diff --git a/lisp/term.el b/lisp/term.el index a7bb7057dc1..0048e0c6908 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -4009,7 +4009,7 @@ The top-most line is line 0." '(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)