From 7f4f3789ea646fdbfc07a41c8f175bfd61811f3a Mon Sep 17 00:00:00 2001 From: Daniel Colascione Date: Fri, 7 Mar 2025 11:07:12 -0800 Subject: [PATCH] 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) --- lisp/term.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.5