diff options
| author | Daniel Colascione | 2025-03-07 11:07:12 -0800 |
|---|---|---|
| committer | Daniel Colascione | 2025-03-07 11:24:21 -0800 |
| commit | 4ea07cc4b4a676a5f8094d565cd3cea89e6ec77d (patch) | |
| tree | 7efa8c435cc1b86dec4db0510ee1a8c8c5e0fd37 | |
| parent | af828499c6a280e3efe017898aab15fba3fae0aa (diff) | |
| download | emacs-4ea07cc4b4a676a5f8094d565cd3cea89e6ec77d.tar.gz emacs-4ea07cc4b4a676a5f8094d565cd3cea89e6ec77d.zip | |
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
| -rw-r--r-- | lisp/term.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/term.el b/lisp/term.el index a74216f00c5..25f90045925 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -4040,7 +4040,7 @@ all pending output has been dealt with.")) | |||
| 4040 | '(term-line-wrap t rear-nonsticky t))))) | 4040 | '(term-line-wrap t rear-nonsticky t))))) |
| 4041 | 4041 | ||
| 4042 | (defun term-erase-in-line (kind) | 4042 | (defun term-erase-in-line (kind) |
| 4043 | (when (= kind 1) ;; erase left of point | 4043 | (when (>= kind 1) ;; erase left of point |
| 4044 | (let ((cols (term-horizontal-column)) (saved-point (point))) | 4044 | (let ((cols (term-horizontal-column)) (saved-point (point))) |
| 4045 | (term-vertical-motion 0) | 4045 | (term-vertical-motion 0) |
| 4046 | (delete-region (point) saved-point) | 4046 | (delete-region (point) saved-point) |