[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/coterm c825746 27/80: Fix issue with ansi-color context
From: |
ELPA Syncer |
Subject: |
[elpa] externals/coterm c825746 27/80: Fix issue with ansi-color context marker |
Date: |
Wed, 13 Oct 2021 18:57:30 -0400 (EDT) |
branch: externals/coterm
commit c8257464abd65e9f4b43cf5a91bbd48d6e658f39
Author: m <>
Commit: m <>
Fix issue with ansi-color context marker
---
coterm.el | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/coterm.el b/coterm.el
index 2e0029e..7f84fec 100644
--- a/coterm.el
+++ b/coterm.el
@@ -72,6 +72,14 @@ Return non-nil if the position was actually reached."
(not (eobp))
(<= col (move-to-column col))))
+(defun coterm--t-apply-proc-filt (proc-filt process str)
+ "Insert STR using PROC-FILT and PROCESS.
+Basically, call PROC-FILT with the arguments PROCESS and STR, but
+adjusting `ansi-color-context-region' beforehand."
+ (when-let ((context ansi-color-context-region))
+ (set-marker (cadr context) (process-mark process)))
+ (funcall proc-filt process str))
+
(defun coterm--t-delete-region (row1 col1 &optional row2 col2)
"Delete text between two positions.
Deletes resulting trailing whitespace as well. ROW1, COL1, ROW2
@@ -100,7 +108,7 @@ characters that were moved after the column specified by
`coterm--t-width'."
(unless (eobp)
(set-marker (process-mark process) (point))
- (funcall
+ (coterm--t-apply-proc-filt
proc-filt process
(concat (make-string newlines ?\n)
(unless (eolp)
@@ -190,13 +198,14 @@ non-whitespace text."
(cl-incf newlines))
(unless (zerop newlines)
(set-marker pmark (point))
- (funcall proc-filt process (make-string newlines ?\n))))
+ (coterm--t-apply-proc-filt
+ proc-filt process (make-string newlines ?\n))))
(let ((col (move-to-column coterm--t-col)))
(set-marker pmark (point))
(when (< col coterm--t-col)
- (funcall proc-filt process
- (make-string (- coterm--t-col col) ?\s))))))
+ (coterm--t-apply-proc-filt
+ proc-filt process (make-string (- coterm--t-col col) ?\s))))))
(setq coterm--t-pmark-in-sync t)
(coterm--t-normalize-home-offset)))
@@ -219,7 +228,7 @@ NEWLINES is the number of newlines STR contains. Unless it
is
zero, insertion must happen at the end of accessible portion of
buffer and the scrolling region must cover the whole screen."
(coterm--t-adjust-pmark proc-filt process)
- (funcall proc-filt process str)
+ (coterm--t-apply-proc-filt proc-filt process str)
(save-excursion
(goto-char (process-mark process))
(let ((column (current-column)))
@@ -378,8 +387,8 @@ initialize it sensibly."
(setq coterm--t-insert-mode nil))
(?\[
(pcase (aref string (1- ctl-end))
- (?m ; Let `comint-output-filter-functions' handle this
- (ins))
+ (?m ; Let `comint-output-filter-functions' handle this
+ (pass-through))
(char
(setq ctl-params (mapcar #'string-to-number
(split-string ctl-params ";")))
- [elpa] externals/coterm 8f0a13b 44/80: Refactor scroll snapping, snap in all windows, (continued)
- [elpa] externals/coterm 8f0a13b 44/80: Refactor scroll snapping, snap in all windows, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm dc5f8db 38/80: Improve doc string, add autoload cookie, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm ee37b4b 39/80: Initial support for char-mode and scroll snapping, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 6f42ba6 45/80: Initialize home marker properly, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 5e40af4 47/80: Prevent modification of user input harder, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm dc9466e 57/80: Implement \t (move cursor to tab stop), needed for "emacs -nw", ELPA Syncer, 2021/10/13
- [elpa] externals/coterm db17a99 62/80: Describe terminal emulation, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm c52f413 67/80: Keep char mode in less after pressing a digit, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm c717c84 75/80: Bind inhibit-read-only to t for terminal emulation, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 570ae6d 74/80: Mention auto char mode as a difference from term.el, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm c825746 27/80: Fix issue with ansi-color context marker,
ELPA Syncer <=
- [elpa] externals/coterm 73aa1f3 31/80: Properly handle OSC and Emacs specific escape sequences, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm f4f69ab 32/80: Export TERMINFO environment variable, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 654e286 49/80: Fix mistake in turning mode off, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm fd4041e 58/80: Remove redundant "(dirty)", ELPA Syncer, 2021/10/13
- [elpa] externals/coterm edfdbb7 50/80: Ignore sequences \e= end \e> (output by mpv), ELPA Syncer, 2021/10/13
- [elpa] externals/coterm e534194 60/80: Fix buffer-locality of saved scroll-margin, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 952b917 52/80: Better indication of current char-mode status, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm bfcd5e4 63/80: Properly indicate that pmark is synchronized, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 96a636e 64/80: Protect user input at EOB more accurately, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm bd7c681 73/80: Further document the "less" line-wrap workaround, ELPA Syncer, 2021/10/13