[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/coterm dc9466e 57/80: Implement \t (move cursor to tab
From: |
ELPA Syncer |
Subject: |
[elpa] externals/coterm dc9466e 57/80: Implement \t (move cursor to tab stop), needed for "emacs -nw" |
Date: |
Wed, 13 Oct 2021 18:57:36 -0400 (EDT) |
branch: externals/coterm
commit dc9466e1a21dc3729402bbb5144f4d3ba21d95e3
Author: m <>
Commit: m <>
Implement \t (move cursor to tab stop), needed for "emacs -nw"
---
coterm.el | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/coterm.el b/coterm.el
index afd4a86..db5ff21 100644
--- a/coterm.el
+++ b/coterm.el
@@ -378,12 +378,16 @@ is the process mark."
(defconst coterm--t-control-seq-regexp
;; Differences from `term-control-seq-regexp':
- ;; Removed: \t, \032 (\C-z)
+ ;;
+ ;; For optimization, we try matching "\r\n" as whole, if possible, instead of
+ ;; \r and \n separately
+ ;;
+ ;; Removed: \032 (\C-z)
;; Added: OSC sequence \e] ... ; ... \e\\ (or \a)
;; Added: sequences \e= and \e>
(concat
;; A control character,
- "\\(?:[\n\000\007\b\016\017]\\|\r\n?\\|"
+ "\\(?:[\n\000\007\t\b\016\017]\\|\r\n?\\|"
;; a C1 escape coded character (see [ECMA-48] section 5.3 "Elements
;; of the C1 set"),
"\e\\(?:[DM78c=>]\\|"
@@ -754,6 +758,20 @@ buffer and the scrolling region must cover the whole
screen."
(?\r (ins) ;; (terminfo: cr)
(setq coterm--t-col 0)
(dirty))
+ ;; TAB (terminfo: ht)
+ ((and ?\t
+ (guard coterm--t-pmark-in-sync)
+ (guard (= pmark (point-max)))
+ (guard (not (coterm--t-scroll-by-deletion-p))))
+ ;; Insert a TAB as is, if at eob
+ (pass-through))
+ (?\t
+ ;; Otherwise, move point to the next tab stop
+ (ins)
+ (setq coterm--t-col
+ (min (1- coterm--t-width)
+ (+ coterm--t-col 8 (- (mod coterm--t-col 8)))))
+ (dirty))
(?\b (ins) ;; (terminfo: cub1)
(setq coterm--t-col (max (1- coterm--t-col) 0))
(dirty))
- [elpa] externals/coterm f334168 24/80: Rename function, (continued)
- [elpa] externals/coterm f334168 24/80: Rename function, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 8b2836e 28/80: Fix incorrect handling of incomplete escape sequences, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 1ec97d2 29/80: \n doesn't go to column 0, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 9184a46 34/80: Always synchronize pmark at the end, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm e64027a 43/80: Restore 'window-point' of non-selected windows, ELPA Syncer, 2021/10/13
- [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 <=
- [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, 2021/10/13
- [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