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
Mitchell Hashimoto
b8832833cb
respect application cursor keys for arrow (DECCKM)
...
This fixes the arrow keys in htop.
2022-11-27 20:57:58 -08:00
Mitchell Hashimoto
584149121d
use enum for underline styles
2022-11-27 14:16:51 -08:00
Mitchell Hashimoto
01573819ea
Configurable 256 Color Palette ( #50 )
...
The 256 color palette can now be configured with the `palette=N=HEX` format in the config. Example, Dracula:
```
foreground=#f8f8f2
background=#282a36
palette=0=#21222c
palette=8=#6272a4
palette=1=#ff5555
palette=9=#ff6e6e
palette=2=#50fa7b
palette=10=#69ff94
palette=3=#f1fa8c
palette=11=#ffffa5
palette=4=#bd93f9
palette=12=#d6acff
palette=5=#ff79c6
palette=13=#ff92df
palette=6=#8be9fd
palette=14=#a4ffff
palette=7=#f8f8f2
palette=15=#ffffff
```
2022-11-20 15:25:51 -08:00
Mitchell Hashimoto
99224ae2c0
implement CSI ESC [ <n> b for repeating previously printed char
2022-11-13 22:07:40 -08:00
Mitchell Hashimoto
feccd550c3
implement many more reset sgr attributes
2022-11-13 21:54:26 -08:00
Mitchell Hashimoto
23e7b8d63e
The cursor should be reset on entering the alt screen
2022-11-13 21:43:59 -08:00
Mitchell Hashimoto
a471eaf980
drop a couple function calls and optimize scrolling a bit
2022-11-08 18:35:19 -08:00
Mitchell Hashimoto
306ab947e7
implement region scrolling directly in screen to use memcpy
...
This doubles scroll region scrolling speed.
2022-11-08 17:35:15 -08:00
Mitchell Hashimoto
c1a9184ebd
sgr: parse italic (render not implemented)
2022-11-07 14:04:40 -08:00
Mitchell Hashimoto
9ee5a5c715
implement ESC c
-- full reset
2022-11-06 18:59:17 -08:00
Mitchell Hashimoto
a05b08fdc7
move bracketed paste to terminal state
2022-11-05 19:31:28 -07:00
Mitchell Hashimoto
79f69885ca
update to latest zig which renames @min/@max
2022-10-19 10:42:31 -07:00
Mitchell Hashimoto
b18309187e
Strikethrough ( #19 )
...
Not as straightforward as it sounds, but not hard either:
* Read OS/2 sfnt tables from TrueType fonts
* Calculate strikethrough position/thickness (prefer font-advertised if possible, calculate if not)
* Plumb the SGR code through the terminal state -- does not increase cell memory size
* Modify the shader to support it
The shaders are getting pretty nasty after this... there's tons of room for improvement. I chose to follow the existing shader style for this to keep it straightforward but will likely soon refactor the shaders.
2022-10-06 15:03:19 -07:00
Mitchell Hashimoto
d5ee4f8b21
Cell GPU cache must also key by screen type (primary/alternate)
2022-09-13 10:43:03 -07:00
Mitchell Hashimoto
9e8d00f140
attach zero-width joiners to cells
2022-09-05 11:32:14 -07:00
Mitchell Hashimoto
8ef31aaaf9
Disable
2022-09-05 11:22:29 -07:00
Mitchell Hashimoto
802f230fa2
handle graphemes with more than 1 joiner
2022-09-05 10:35:22 -07:00
Mitchell Hashimoto
7ceff79ea9
various methods on Row are grapheme-aware and tested
2022-09-05 09:47:35 -07:00
Mitchell Hashimoto
b3ec7028fb
detect and attach grapheme to grapheme data
2022-09-04 21:57:07 -07:00
Mitchell Hashimoto
f3f60e47d1
clearHistory
2022-09-03 21:40:03 -07:00
Mitchell Hashimoto
30a14d230e
process ASCII events manually to avoid function call overhead
2022-09-01 17:53:40 -07:00
Mitchell Hashimoto
77c8ec0a20
the big screen switchover
2022-09-01 00:58:47 -07:00
Mitchell Hashimoto
4a247e3bb8
single shift 2/3
2022-08-27 10:16:21 -07:00