[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/coterm ff83d09 03/80: Handle \e[1K
From: |
ELPA Syncer |
Subject: |
[elpa] externals/coterm ff83d09 03/80: Handle \e[1K |
Date: |
Wed, 13 Oct 2021 18:57:24 -0400 (EDT) |
branch: externals/coterm
commit ff83d09d1a89fd156906b039500d5aef2ca76cbd
Author: m <>
Commit: m <>
Handle \e[1K
---
coterm.el | 52 ++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 38 insertions(+), 14 deletions(-)
diff --git a/coterm.el b/coterm.el
index 3437776..87f10cd 100644
--- a/coterm.el
+++ b/coterm.el
@@ -310,22 +310,46 @@ initialize it sensibly."
(cl-decf coterm--t-col (car ctl-params))
(setq coterm--t-col (max coterm--t-col 0))
(dirty))
- (?J ;; \E[J - clear to end of screen (terminfo: ed,
clear)
+ ;; \E[J - clear to end of screen (terminfo: ed, clear)
+ ((and ?J (guard (eq 0 (car ctl-params))))
(ins)
(coterm--t-approximate-pmark pmark)
- (pcase (car ctl-params)
- (0
- (delete-region pmark (point-max)))
- (1 (coterm--t-normalize-home-offset)
- (delete-region coterm--t-home-marker pmark)
- (unless (= pmark (point-max))
- ;; Substitute deleted region with empty lines
- (funcall proc-filt process
- (concat (make-string coterm--t-row
?\n)
- (make-string coterm--t-col
?\s)))))
- (_ (coterm--t-normalize-home-offset)
- (delete-region coterm--t-home-marker
(point-max))))
- (dirty))))))))))
+ (delete-region pmark (point-max))
+ (dirty))
+ ((and ?J (guard (eq 1 (car ctl-params))))
+ (ins)
+ (coterm--t-approximate-pmark pmark)
+ (coterm--t-normalize-home-offset)
+ (delete-region coterm--t-home-marker pmark)
+ (if (= pmark (point-max))
+ (dirty)
+ ;; Substitute deleted region with empty lines
+ (funcall proc-filt process
+ (concat (make-string coterm--t-row ?\n)
+ (unless (eq (char-after pmark)
?\n)
+ (make-string coterm--t-col
?\s))))))
+ (?J
+ (ins)
+ (coterm--t-normalize-home-offset)
+ (delete-region coterm--t-home-marker (point-max))
+ (dirty))
+ (?K ;; \E[K - clear to end of line (terminfo: el, el1)
+ (ins)
+ (coterm--t-approximate-pmark pmark)
+ (save-excursion
+ (goto-char pmark)
+ (if (eq 1 (car ctl-params))
+ ;; Clear left of pmark
+ (forward-line 0)
+ ;; Clear right of pmark
+ (forward-line 1)
+ (unless (eobp)
+ (backward-char)))
+ (delete-region (point) pmark)
+ (if (eolp)
+ (if (eq 1 (car ctl-params)) (dirty))
+ (funcall proc-filt process
+ (make-string coterm--t-col
?\s)))))))))))))
(cond
((setq match (string-match coterm-t-control-seq-prefix-regexp
- [elpa] branch externals/coterm created (now da8019b), ELPA Syncer, 2021/10/13
- [elpa] externals/coterm ff83d09 03/80: Handle \e[1K,
ELPA Syncer <=
- [elpa] externals/coterm 9e3e19b 05/80: Add support for \e[L, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm aa4a7f9 08/80: Support \e[M, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 29ef3ad 07/80: Fix scrolling, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm ba74fb8 10/80: Simplify, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm f1cc63e 12/80: Support \e[6n for reporting cursor position, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm cfc9f03 13/80: Fix some escape params defaulting to 1, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm cf9217d 09/80: Support \e[P and \e[@, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm e22fe83 17/80: Adjust column after resizing window, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 586ce4e 20/80: Delete off-screen rows when scrolling up, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 7b1e001 01/80: Initial commit, ELPA Syncer, 2021/10/13