Mitchell Hashimoto
ac12d2eb97
terminal: all commands parsed, need tests
2023-08-20 22:03:20 -07:00
Mitchell Hashimoto
f4a40168da
terminal: a lot more kitty command parsing
2023-08-20 22:03:20 -07:00
Mitchell Hashimoto
94040c05f0
terminal: initial kitty graphics command parsing
2023-08-20 22:03:19 -07:00
Mitchell Hashimoto
b9db629662
terminal: kitty graphics command/control structs
2023-08-20 22:03:19 -07:00
Mitchell Hashimoto
fc7b3689fc
terminal: move kitty keyboard protocol to its own file
2023-08-20 22:03:19 -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
8435d45bc9
terminal: proper reverseIndex behavior with scroll region set
...
Fixes #298
This fix is quite simple and the code should be more or less obvious:
we weren't handling scroll regions properly for the reverse index (RI)
escape sequence.
2023-08-18 08:32:13 -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
c80b1bed75
terminal: add Kitty key flags, stack
2023-08-16 17:31:04 -07:00
Mitchell Hashimoto
8ca8da38d8
Merge pull request #291 from mitchellh/grapheme-sel
...
Fix multiple bugs related to selecting, copying grapheme clusters
2023-08-15 15:57:26 -07:00
Mitchell Hashimoto
9e27dcdec9
font: shaper doesn't split run on selection if selection splits grapheme
2023-08-15 15:32:10 -07:00
Mitchell Hashimoto
c8d1745791
terminal: selection string must include grapheme data
2023-08-15 14:55:43 -07:00
Mitchell Hashimoto
67fb8d9bd4
terminal: do not crash if selecting a wide spacer on a soft-wrapped line
2023-08-15 14:38:13 -07:00
Mitchell Hashimoto
6a4b25714a
terminal: add a test to verify our grapheme state is what we expect
2023-08-15 13:55:35 -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
716c343f07
terminal: ModeState can save/restore one set of modes
2023-08-15 08:43:25 -07:00
Mitchell Hashimoto
e467a48df0
terminal: working on new modes storage abstraction
2023-08-15 08:43:24 -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
cea6f5f51d
terminal: parse mode 1039
2023-08-13 15:15:11 -07:00
Mitchell Hashimoto
4a384aa272
parse and respect mode 1036
2023-08-13 15:12:13 -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
Mitchell Hashimoto
63fa34ef6b
terminal: avoid underflow on resize, tests added
2023-08-12 11:30:07 -07:00
Mitchell Hashimoto
9b5fd4b2ee
terminal: print wide char with 1-col width
2023-08-12 10:27:42 -07:00
Mitchell Hashimoto
71c8d5fc8e
terminal: resizing to 1 col wide with wide chars
2023-08-12 10:23:06 -07:00
Mitchell Hashimoto
44dd51a5b9
terminal: less col resizing with wide char needs to insert head spacer
2023-08-12 10:07:13 -07:00
Mitchell Hashimoto
eb10e9642c
terminal: introduce wide spacer head if reflowing wide char w/ more cols
2023-08-12 09:51:33 -07:00
Mitchell Hashimoto
3d5eda62fe
terminal: resize more cols with wide spacer head across multiple lines
2023-08-12 08:26:13 -07:00
Mitchell Hashimoto
a6af75aee4
terminal: resize more cols with wide spacer head deletes the spacer
2023-08-12 08:20:10 -07:00
Mitchell Hashimoto
3d72178ef4
terminal: delete wide char if it wraps and we delete the row above
2023-08-11 16:23:02 -07:00
Mitchell Hashimoto
8bb69045a8
terminal: allow selections outside of written area and clamp
...
This fixes a possible crash.
2023-08-11 14:21:07 -07:00
Mitchell Hashimoto
a8380e937d
scroll top, bot, page up, page down binding actions
2023-08-09 07:24:11 -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
24ef5d1b1c
tests for insert mode (4)
2023-08-07 08:07:14 -07:00
Mitchell Hashimoto
5c6d3c7df2
terminal: implement insert mode (mode = 4)
2023-08-07 07:44:13 -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
791e1a84af
terminal: don't export plainString, its only for testing
2023-07-09 11:56:19 -07:00
Mitchell Hashimoto
a890cc3a5b
terminal: add screen.dumpString
2023-07-09 11:52:37 -07:00
Mitchell Hashimoto
de66d4925a
terminal: rename scroll "delta/delta_no_grow" to screen/viewport
2023-07-08 13:47:16 -07:00
Mitchell Hashimoto
1a94f6ba7d
terminal: do not scroll viewport if new lines are added while scrolled
2023-07-08 13:42:00 -07:00
Mitchell Hashimoto
b3b19997ea
terminal: scroll to row always tries to get it to the top
2023-07-06 10:31:47 -07:00
Mitchell Hashimoto
9f86c48fd8
keybinding jump_to_prompt for semantic prompts
2023-07-06 10:30:29 -07:00