Mitchell Hashimoto
70b017200a
copying selection trims trailing whitespace
...
This is configurable with `clipboard-trim-trailing-spaces`.
This also fixes a bug where debug builds would crash when copying blank
lines. This never affected release builds.
2022-11-22 21:27:05 -08:00
Mitchell Hashimoto
d1b565f4d4
hook up triple-click in UI to select lines
2022-11-22 10:07:52 -08:00
Mitchell Hashimoto
8b839ef4b6
screen selectLine and tests
2022-11-22 10:03:20 -08:00
Mitchell Hashimoto
04088abe5a
fix regression around selecting word at end of screen
2022-11-22 09:41:07 -08:00
Mitchell Hashimoto
a63815c5ba
selectWord goes across soft-wrapped lines
2022-11-22 08:04:27 -08:00
Mitchell Hashimoto
f7c6ea63e1
screen selectWord starting functionality, not done at all
2022-11-21 21:34:38 -08:00
Mitchell Hashimoto
56de5846f4
OSC 52: Clipboard Control ( #52 )
...
This adds support for OSC 52 -- applications can read/write the clipboard. Due to the security risk of this, the default configuration allows for writing but _not reading_. This is configurable using two new settings: `clipboard-read` and `clipboard-write` (both booleans).
2022-11-21 15:12:00 -08:00
Mitchell Hashimoto
d213c1a939
fix selection regression caused by screen copy optimization
2022-11-20 20:05:07 -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
02b6eb123e
fix test name
2022-11-18 18:18:10 -08:00
Mitchell Hashimoto
dbf167d18a
OSC parsing for get/set clipboard (OSC 52) -- not hooked up yet
2022-11-18 18:16:53 -08:00
Mitchell Hashimoto
a714ee2702
fix memory leak when grapheme clusters of >4 codepoints are present
2022-11-18 14:15:14 -08:00
Mitchell Hashimoto
69fdd57aa3
screen: support scroll region scrolling with circular buffer wraparound
2022-11-16 09:28:56 -08:00
Mitchell Hashimoto
4ced2290b3
OSC handling, handle OSC change window title command
2022-11-14 10:46:40 -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
019f1e34bb
metal: copy screen data (see opengl commit for why)
2022-11-13 17:29:23 -08:00
Mitchell Hashimoto
3fcdd9a196
fix outdated test
2022-11-13 16:25:50 -08:00
Mitchell Hashimoto
f1c69343d3
opengl: copy screen data instead of sharing state
...
Through benchmarking I've determined this lowers lock contention by
about 50% on the critical data.
2022-11-13 16:16:08 -08:00
Mitchell Hashimoto
ce85d9a2cd
add more tracing, unroll a loop
2022-11-08 19:15:14 -08:00
Mitchell Hashimoto
d1718e6cbf
use libc memcpy/memmove instead of std.mem if available
2022-11-08 19:01:45 -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
8a871e1294
missing trace
2022-11-08 13:57:12 -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
d916d56bff
IO thread stream handler is in, lots of commented TODOs
2022-11-05 19:31:02 -07:00
Mitchell Hashimoto
79f69885ca
update to latest zig which renames @min/@max
2022-10-19 10:42:31 -07:00
Mitchell Hashimoto
e493a722a3
fix some issues that fail nightly stage2 compiler
2022-10-13 10:54:30 -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
1a2b684b0e
RGB should not be packed, so that it has align = 1
2022-09-23 13:10:51 -07:00
Mitchell Hashimoto
c68c487e14
Make selection part of the cache key for GPU cells
...
If the selection state changes for a given row, the row must be
invalidated.
2022-09-14 19:58:36 -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
7bde20a43d
a cell is empty only if it also has no styling
...
Previously we only checked if it had no character. With text shaping,
this was causing runs of only empty backgrounds to not render.
2022-09-13 10:12:44 -07:00
Mitchell Hashimoto
662b656218
implement LRU row GPU cell caching
2022-09-12 11:28:47 -07:00
Mitchell Hashimoto
8995e74e23
rows are dirty when initialized
2022-09-10 11:01:40 -07:00
Mitchell Hashimoto
08b7a866b6
Screen dirty tracking
2022-09-10 10:59:57 -07:00
Mitchell Hashimoto
98dff5a163
better handling of combination characters
2022-09-07 20:10:06 -07:00
Mitchell Hashimoto
85dff335f1
much more accurate run splits and cell widths in runs
2022-09-07 10:30:40 -07:00
Mitchell Hashimoto
3754de3b95
test very long emoji
2022-09-06 14:21:07 -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
47242ad12a
test writing graphemes
2022-09-05 10:29:52 -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
a605ff07e1
setup flags, storage for graphemes
2022-09-04 11:17:41 -07:00
Mitchell Hashimoto
e6564dfd11
fix some resize crashes
2022-09-04 09:43:20 -07:00