412 Commits

Author SHA1 Message Date
Mitchell Hashimoto
d05381db83 remove some unreachables, log errors to avoid crashes
These are still TODO but we don't want to crash on bad input.
2023-08-31 14:55:27 -07:00
Mitchell Hashimoto
7e846bd367 terminal: tabstops were off by one
Fixes #359

See #359 for a test script. The unit tests were also wrong. I used the
test script in #359 to verify the exact column that tabstops should be
set at.
2023-08-29 20:18:54 -07:00
Mitchell Hashimoto
86495e826c Merge pull request #317 from mitchellh/kitty-gfx
Kitty Graphics Protocol Initial Support
2023-08-24 08:50:13 -07:00
Mitchell Hashimoto
9ab25ef350 terminal/kitty-gfx: delete intersecting cursor 2023-08-23 10:53:38 -07:00
Mitchell Hashimoto
a082e4c1a2 terminal: delete lines (CSI M) should clamp count to remaining lines 2023-08-22 16:43:21 -07:00
Mitchell Hashimoto
71f1f35cfc terminal/kitty-gfx: move cursor after image placement 2023-08-22 12:15:51 -07:00
Mitchell Hashimoto
660faf3ac3 terminal: clear screen, alt screen, etc. clear all kitty graphics 2023-08-21 15:34:46 -07:00
Mitchell Hashimoto
b2432a672f terminal/kitty-gfx: add debug function to dump image data 2023-08-21 08:28:20 -07:00
Mitchell Hashimoto
c7658df978 terminal/kitty-gfx: support "query", loading images, tests 2023-08-20 22:03:20 -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
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
6a4b25714a terminal: add a test to verify our grapheme state is what we expect 2023-08-15 13:55:35 -07:00
Mitchell Hashimoto
951aa00c63 terminal: move to new modes struct 2023-08-15 11:30:33 -07:00
Mitchell Hashimoto
4a384aa272 parse and respect mode 1036 2023-08-13 15:12:13 -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
9b5fd4b2ee terminal: print wide char with 1-col width 2023-08-12 10:27:42 -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
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
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
9f86c48fd8 keybinding jump_to_prompt for semantic prompts 2023-07-06 10:30:29 -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
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
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
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
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
414f2e52a5 terminal: semantic prompt aware resize 2023-05-31 16:16:00 -07:00
Mitchell Hashimoto
56928b926a terminal: don't log semantic prompt marks 2023-05-27 16:55:19 -07:00
Mitchell Hashimoto
7b651627d5 core: surface confirm close logic updated to handle semantic prompts 2023-05-27 16:00:35 -07:00
Mitchell Hashimoto
4047a90555 terminal: track semantic prompt metadata per row 2023-05-27 15:45:51 -07:00
Mitchell Hashimoto
80402b655c update zig 2023-05-25 21:47:05 -07:00
Mitchell Hashimoto
dfb40426a0 move selection to screen 2023-03-21 10:43:50 -07:00
Mitchell Hashimoto
b1af02941a terminal: implement focus event mode 1004
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-FocusIn_FocusOut
2023-03-20 15:20:14 -07:00
Mitchell Hashimoto
1b88f7e9ab support mouse alt scroll (mode 1007)
This enables less and other older legacy programs to get mouse scroll
events
2023-03-17 19:10:08 -07:00
Mitchell Hashimoto
5573df4947 terminal: erase display complete needs to reset row wrap state 2023-03-02 13:20:06 -08:00
Mitchell Hashimoto
05fe2a83b1 terminal: erase display below should unwrap soft wrapped state 2023-03-01 21:30:31 -08:00
Mitchell Hashimoto
e210c91d10 update zig version, update @call for newer zig version 2022-12-16 22:34:54 -08:00
Mitchell Hashimoto
ad9b773cd8 terminal: printing char outside of ASCII with non-UTF8 charset is space 2022-12-14 21:50:32 -08:00
Mitchell Hashimoto
6f451f22bb terminal: only clear wide spacer head if wide char is not on first line 2022-12-14 21:39:45 -08:00
Mitchell Hashimoto
8534e5a186 terminal: insertLines with count 0 no longer crashes 2022-12-14 21:29:06 -08:00
Mitchell Hashimoto
c01a9f583f zero-width chars are ignored if they're at col 0
This can cause a crash, and is impossible since zero-width chars are
always attached to a prior character. Word-wrapping doesn't come into
play here because this check happens prior to the wrapping.
2022-12-14 19:20:05 -08:00