Mitchell Hashimoto
c2af7b60d0
terminal: FF (0x0D) also invokes LF
2023-10-06 12:00:18 -07:00
Mitchell Hashimoto
823f47f695
termio: hook up dcs callbacks
2023-09-27 13:32:00 -07:00
Mitchell Hashimoto
032fcee9ff
terminal: DCS handler, XTGETTCAP parsing
2023-09-27 12:07:31 -07:00
Mitchell Hashimoto
5528580a29
terminal: DECSED, DECSEL parsing, tests
2023-09-25 10:56:59 -07:00
Mitchell Hashimoto
8137a66ef6
terminal: CSI Ps " q for setting DEC protected mode
2023-09-25 10:56:59 -07:00
Mitchell Hashimoto
92e98d34b5
terminal: CSI E and F
2023-09-21 08:21:32 -07:00
Tim Culverhouse
fbe030d85a
terminal: respond to XTVERSION query
...
XTVERSION (CSI > 0 q) is used by some libraries to identify the terminal
+ version. Respond to this query with `ghostty {version_string}`. There
is no formal format for this response. A roundup of a few tested
terminals show two primary formats. This patch opts to save one byte and
use the `name SP version` semantics.
foot: foot(version)
xterm: XTerm(version)
contour: contour version
wezterm: wezterm version
Reference: https://github.com/dankamongmen/notcurses/blob/master/TERMINALS.md#notes-for-terminal-authors
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2023-09-20 19:06:28 -05:00
Mitchell Hashimoto
8694d29bd0
terminal: ignore CSI S with intermediates
2023-09-17 09:39:03 -07:00
Mitchell Hashimoto
19ef4a22a9
terminal: stylistic changes for OSC terminators, 10/11 params
2023-09-14 13:12:41 -07:00
cryptocode
dc14ca86ca
Review updates:
...
* Change state names to more human readable query_default_fg/bg
* Single-line state prongs
* String terminator is not an enum
* Removed `endWithStringTerminator` and added nullabe arg to `end`
* Fixed a color reporting bug, fg/bg wasn't correctly picked
2023-09-14 21:46:23 +02:00
cryptocode
a3696a9185
Implement OSC 10 and OSC 11 default color queries
...
These OSC commands report the default foreground and background colors.
Most terminals return the RGB components scaled up to 16-bit components, because some
legacy software are unable to read 8-bit components. The PR follows this conventions.
iTerm2 allow 8-bit reporting through a config option, and a similar option is
added here. In addition to picking between scaled and unscaled reporting, the user
can also turn off OSC 10/11 replies altogether.
Scaling is essentially c / 1 * 65535, where c is the 8-bit component, and reporting
is left-padded with zeros if necessary. This format appears to stem from the XParseColor
format.
2023-09-14 21:41:40 +02:00
Mitchell Hashimoto
cb2931cb27
rename cursor shape to mouse shape for OSC 22
2023-09-14 11:12:17 -07:00
Mitchell Hashimoto
7734bab8c4
terminal: cursor shape parsing, hook up to apprt callback
2023-09-14 10:12:38 -07:00
Mitchell Hashimoto
24af24a086
terminal: CSI q requires a space intermediate
2023-09-10 22:01:17 -07:00
Mitchell Hashimoto
f8335c10d8
terminal: disable noisy logs
2023-09-03 14:02:55 -07:00
Mitchell Hashimoto
cdf81b610d
terminal: mark prompt continuation lines, end prompt clear at first
...
prompt
2023-09-03 14:00:56 -07:00
Mitchell Hashimoto
3b9d5d27ad
terminal: implement DECRQM (request mode)
2023-08-28 08:50:11 -07:00
Mitchell Hashimoto
6e061fb344
termio/exec: process APC callbacks
2023-08-20 22:03:19 -07:00
Mitchell Hashimoto
29e3e79b94
terminal: parse APC strings
2023-08-20 22:03:19 -07:00
Mitchell Hashimoto
e7ab16f0e1
terminal: CSI < u defaults param to "1" if not set (pop kitty keyboard)
2023-08-20 22:02:12 -07:00
Mitchell Hashimoto
c8a07abdf3
terminal: ignore SOH/STX, bash sends this for some reason
2023-08-17 13:40:11 -07:00
Mitchell Hashimoto
af4ede40f1
terminal: implement CSI = u for setting kitty keyboard flags
2023-08-16 17:31:05 -07:00
Mitchell Hashimoto
a9d7e0eb7f
terminal: parse kitty query, push, pop keyboard flags
2023-08-16 17:31:05 -07:00
Mitchell Hashimoto
06f82ad713
terminal: parse and handle save/restore mode (CSI ? s, CSI ? r)
2023-08-15 11:43:07 -07:00
Mitchell Hashimoto
951aa00c63
terminal: move to new modes struct
2023-08-15 11:30:33 -07:00
Mitchell Hashimoto
d27bc1f0fe
termio: send VT220 device attributes on request, add secondary
2023-08-15 08:21:48 -07:00
Mitchell Hashimoto
a2310afa4e
terminal: ignore ESC \ which enables ST mode since we're always in it
2023-08-13 15:52:38 -07:00
Mitchell Hashimoto
77df7a0e7f
terminal: support disable modify key format sequence ESC[>n
2023-08-13 14:55:32 -07:00
Mitchell Hashimoto
66aa1d9be3
terminal: parse and handle set modify key format (ESC[>{a};{b}m)
2023-08-13 14:55:32 -07:00
Mitchell Hashimoto
d94474463b
terminal: handle set application keypad mode (both ESC and modes)
2023-08-13 14:55:32 -07:00
Kevin Hovsäter
22b8173164
Fix typos
2023-08-08 14:27:34 +02:00
Mitchell Hashimoto
5e100a3b6b
CSI r for top/bot margin must have no intermediates
...
We were incorrectly interpreting the restore mode CSI (`ESC [ ? r`) as
set top and bottom margin. We need to verify that there are no
intermediates.
2023-08-07 09:45:44 -07:00
Mitchell Hashimoto
e45c8d97d7
CSI for SGR only if there are no intermediates
...
Fixes #210
We were previously taking any `CSI <symbol> <data> m` as SGR. But SGR is
only if "symbol" is empty. There are other forms of `CSI m` that set the
intermediate symbol to `?` or `>` and we don't implement those. We
shouldn't treat that as a SGR attribute either.
2023-07-20 19:23:01 -07:00
Mitchell Hashimoto
314f9287b1
Update Zig ( #164 )
...
* update zig
* pkg/fontconfig: clean up @as
* pkg/freetype,harfbuzz: clean up @as
* pkg/imgui: clean up @as
* pkg/macos: clean up @as
* pkg/pixman,utf8proc: clean up @as
* clean up @as
* lots more @as cleanup
* undo flatpak changes
* clean up @as
2023-06-30 12:15:31 -07:00
Mitchell Hashimoto
56f8e39e5b
Update zig, mach, fmt
2023-06-25 11:08:20 -07:00
Mitchell Hashimoto
ab93beaa15
CSI aliases
2023-06-25 10:30:25 -07:00
Mitchell Hashimoto
744634cedf
CSI f
2023-06-25 10:27:25 -07:00
Mitchell Hashimoto
9110c07763
CSI ? W
2023-06-25 10:26:29 -07:00
Mitchell Hashimoto
68b951f19d
CSI W - cursor tabulation control
2023-06-25 10:23:10 -07:00
Mitchell Hashimoto
03fd649b5e
terminal: CHT/CBT
2023-06-25 09:53:58 -07:00
Mitchell Hashimoto
97df179b04
terminfo: switch to semicolon SGR 48 to prevent render issues
2023-06-24 15:04:33 -07:00
Mitchell Hashimoto
86705a181a
finalize comments
2023-06-20 09:40:50 -07:00
Mitchell Hashimoto
b9bc61c0a4
terminal: parse underline color sequences (but do not handle yet)
2023-06-20 09:34:29 -07:00
Mitchell Hashimoto
28a22fc07f
various tests to ensure we parse curly underlines correctly
2023-06-20 09:24:07 -07:00
Mitchell Hashimoto
e59b2f7fca
terminal: track pwd reported via OSC 7
2023-05-31 18:54:24 -07:00
Mitchell Hashimoto
414f2e52a5
terminal: semantic prompt aware resize
2023-05-31 16:16:00 -07:00
Mitchell Hashimoto
de00892f8e
termio/exec: handle semantic prompt events
2023-05-27 15:48:31 -07:00
Mitchell Hashimoto
4047a90555
terminal: track semantic prompt metadata per row
2023-05-27 15:45:51 -07:00
Mitchell Hashimoto
36c6e95dfc
terminal: ignore invalid C0 escape codes
2022-12-14 20:57:31 -08:00
Mitchell Hashimoto
d7fe6a1c47
fix sgr parsing for underline styles
2022-11-27 15:30:02 -08:00