433 Commits

Author SHA1 Message Date
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
Mitchell Hashimoto
b542f7e3c4 terminal: jump to prompt core methods 2023-07-06 10:16:07 -07:00
Mitchell Hashimoto
738c4dff4c clear_screen keybinding works even when not at shell prompt
Instead of sending formfeed (0x0C), clear_screen actually does a
terminal emulator level clear instead. This MOSTLY matches the behavior
of iTerm and Terminal.app, with some differences:

  1. I do not clear _below_ the cursor. I feel like the use case for
     this feature is primarily to clear above the cursor. Happy to be
     wrong here but I want it proven to me!

  2. I do not clear in alternate screen mode. Clearing alt screens
     breaks rendering in Vim, less, etc. and it feels like the wrong
     behavior.
2023-07-05 14:01: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
fdf652fe5a Merge pull request #160 from mitchellh/cbt
CSI for tab forward/back (CBT/CHT)
2023-06-25 10:01:21 -07:00
Mitchell Hashimoto
03fd649b5e terminal: CHT/CBT 2023-06-25 09:53:58 -07:00
Mitchell Hashimoto
cbded6a95a terminal: horizontalTabBack function 2023-06-25 09:49:18 -07:00
Mitchell Hashimoto
c6356930cc renderer: support invisible attribute 2023-06-25 09:31:33 -07:00
Mitchell Hashimoto
aafff194f9 terminal: SGR parse invisible (attr 8, 28) 2023-06-25 09:19:43 -07:00
Mitchell Hashimoto
60d4024d64 terminal: reset CSI param separator in parser on clear 2023-06-24 15:16:54 -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
8d40fba9ce terminal: correct assertion for scrollUp 2023-06-23 14:06:40 -07:00
Mitchell Hashimoto
86705a181a finalize comments 2023-06-20 09:40:50 -07:00
Mitchell Hashimoto
860209e968 terminal: track underline color on cell 2023-06-20 09:37:58 -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
553e09eff9 apprt/embedded: new surfaces inherit last focused 2023-05-31 19:12:01 -07:00
Mitchell Hashimoto
e59b2f7fca terminal: track pwd reported via OSC 7 2023-05-31 18:54:24 -07:00
Mitchell Hashimoto
b538072972 terminal: osc 7 parsing 2023-05-31 17:32:06 -07:00
Mitchell Hashimoto
e26cb46f4a terminal: tests for semantic prompt on resize 2023-05-31 16:20:30 -07:00
Mitchell Hashimoto
414f2e52a5 terminal: semantic prompt aware resize 2023-05-31 16:16:00 -07:00