Mitchell Hashimoto
54d47e8390
update TODO
2022-09-07 16:10:27 -07:00
Mitchell Hashimoto
278d9ad9d6
add tracing
2022-09-07 16:10:16 -07:00
Mitchell Hashimoto
90e4d12f79
only scale fonts to height
2022-09-07 15:59:23 -07:00
Mitchell Hashimoto
c1bb6450b0
fix some emoji sizing
2022-09-07 14:41:37 -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
3f1942223b
only test presentation VS15/16 if directly adjacent to codepoint
2022-09-06 14:26:43 -07:00
Mitchell Hashimoto
da7843e8b4
test shaping a long emoji
2022-09-06 14:25:29 -07:00
Mitchell Hashimoto
3754de3b95
test very long emoji
2022-09-06 14:21:07 -07:00
Mitchell Hashimoto
f40eb3663a
kind of handle VS15/16 better, its not blank anymore, but its wrong
2022-09-06 13:56:20 -07:00
Mitchell Hashimoto
e326bc4921
fonts are presentation format aware (text vs emoji)
2022-09-06 13:30:29 -07:00
Mitchell Hashimoto
302889bfb3
font don't include convert
2022-09-05 22:53:29 -07:00
Mitchell Hashimoto
0d2c03c21c
Font face handles zero-width glyphs (weird but happens)
2022-09-05 22:53:00 -07:00
Mitchell Hashimoto
90d250a3ba
Rebase
2022-09-05 11:41:40 -07:00
Mitchell Hashimoto
480d262bc1
Calculate grid_width properly, use that instead of wide mask in shader
2022-09-05 11:38:53 -07:00
Mitchell Hashimoto
3231b84927
Ligatures
...
This introduces a naive first pass at integrating ligatures. The basic
ligatures (such as "==" in some fonts) work great. Skin-toned emoji are
struggling a bit.
This isn't the most performant way to do this, either, and I plan on
improving that.
2022-09-05 11:38:52 -07:00
Mitchell Hashimoto
d839257c04
Merge pull request #11 from mitchellh/graphemes
...
Graphemes and ZWJs
2022-09-05 11:36:38 -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
eb0913d1b4
update TODO
2022-09-04 09:47:49 -07:00
Mitchell Hashimoto
e6564dfd11
fix some resize crashes
2022-09-04 09:43:20 -07:00
Mitchell Hashimoto
f417659368
on resize, if rows increasing, handle that first
2022-09-03 22:33:20 -07:00
Mitchell Hashimoto
ac9f9b29d6
bump render to 144hz, slowest 120hz
2022-09-03 22:17:25 -07:00
Mitchell Hashimoto
1d5edb25b5
New Screen Storage
...
This rewrites the "screen" implementation. The immediate user-impacting highlights:
* `time cat <large file>.txt` is ~25% faster
* Fully loaded (full scrollback) memory usage is 25% smaller
* Scrollback is now dynamically allocated. This lowers initial memory usage
* Resize without reflow (common with full screen apps like vim) is now ~10% faster
* Resize with text reflow is ~20% faster when the column count doesn't change
* All resize operations now maintain the cursor position correctly in more cases
Besides those impacts, the goals of this rewrite was to lay the foundation for the screen state to performantly handle text shaping (ligatures) and grapheme clusters (unicode zero-width joiners, combination markers, etc.). This new structure will let us track dirty state on a row-by-row basis for better caching of GPU resources, eventually (not in this PR), which is particularly important for text shaping (ligatures).
2022-09-03 21:50:24 -07:00
Mitchell Hashimoto
f3f60e47d1
clearHistory
2022-09-03 21:40:03 -07:00
Mitchell Hashimoto
6373900dfa
comment on screen struct
2022-09-03 21:35:43 -07:00
Mitchell Hashimoto
c0e36bedd6
remove dirty for now
2022-09-03 21:26:49 -07:00
Mitchell Hashimoto
3d0ec16ad4
resize with shrinking cols
2022-09-03 21:25:06 -07:00
Mitchell Hashimoto
7134ddec4e
resize less rows
2022-09-03 17:59:24 -07:00
Mitchell Hashimoto
1121438d8a
maybe clean up resize more cols
2022-09-03 17:50:04 -07:00
Mitchell Hashimoto
d6e243cde1
resize with reflow more cols
2022-09-03 17:28:26 -07:00
Mitchell Hashimoto
2583b8cb65
fix y pos on resize
2022-09-03 12:25:26 -07:00
Mitchell Hashimoto
41f2b756ae
fix scrolling and new row calculation
2022-09-03 12:18:45 -07:00
Mitchell Hashimoto
d22a323896
clean up some assertions
2022-09-01 23:25:51 -07:00
Mitchell Hashimoto
81b805b8c2
use an arena allocator for tty allocs
...
libuv always called the alloc cb right before read, and read owns the
buffer. By using an arena, we're probably just reusing the same buffer
over and over again. This should be quite fast.
In tracing, this indeed changes the MTPC on ttyReadAlloc from ~750ns to
~275ns. I'll take it!
2022-09-01 22:48:33 -07:00
Mitchell Hashimoto
8d6e8eb0aa
asserts not being optimized away, use comptime gate
2022-09-01 22:21:54 -07:00
Mitchell Hashimoto
57725cf3a4
cache row iterator max value
2022-09-01 22:05:42 -07:00
Mitchell Hashimoto
5aa6d79519
screen: cache history offset
...
This is a super hot calculation so taking up memory to cache it resulted
in 15m less function calls when catting a 10mb file, and ~5% speedup.
2022-09-01 21:36:59 -07:00
Mitchell Hashimoto
73581eee0b
small optimizations
2022-09-01 18:36:27 -07:00
Mitchell Hashimoto
30a14d230e
process ASCII events manually to avoid function call overhead
2022-09-01 17:53:40 -07:00
Mitchell Hashimoto
d404be2993
grow our scrollback much faster
2022-09-01 01:15:20 -07:00
Mitchell Hashimoto
dba027d307
resize should maintain minimum of screen rows
2022-09-01 01:09:06 -07:00
Mitchell Hashimoto
77c8ec0a20
the big screen switchover
2022-09-01 00:58:47 -07:00
Mitchell Hashimoto
2f2b12a32f
resize without reflow preserves cursor better
2022-08-31 21:51:01 -07:00
Mitchell Hashimoto
89e931e468
our new resize without reflow supports scrollback so test that
2022-08-31 21:29:28 -07:00
Mitchell Hashimoto
4056f2abf9
new screen supports resize without reflow
2022-08-31 20:48:48 -07:00