commits
Use upstream. Instead of using the 0.14.1 release we are opting for this
commit since it includes the removal of `usingnamespace`, which means we
can have incremental compilation
Misuse of contractions.
See also:
- https://search.brave.com/search?q=it%27s+vs+its
- https://www.merriam-webster.com/grammar/when-to-use-its-vs-its
Fix vxfw.Surface.satisfiesContraints to properly check constraints.
Implement the kitty scaled text extension. We do this by adding a Scale
struct to the core Cell structure. The scale struct defines the scale,
numerator, denominator, and vertical positioning. We also query
independently for scaled text vs explicit width text.
Users of scaled text must be very careful of how they model their cells,
as cells must be written ahead of time with knowledge of the
capabilities of the underlying terminal. Libvaxis does not move contents
of cells based on scale (ie 3 contiguous cells of scale=2 with contents
"abc" will not transform into what you think - the user of the library
must take car to put a, b, and c into appropriate cells. Libvaxis will
do the work to prevent overwriting the cell). Capability can be checked
in the vx.caps.scaled_text value.
This reduces the time in Vaxis.render. I ran perf several times for ~60
seconds each time on example/vaxis.zig.
Before => 15.17% in Vaxis.render
After => 14.15% in Vaxis.render
This was introduced in zig 0.14
Why didn't I do this earlier? This results in about a 20% memory savings
when testing out the examples. We have 3 arraylists per Cell, so for
each cell we now save usize * 3 = 192 bytes, for my typical full screen
terminal I have 239 x 47 cells. That's a total of 2.1Mb!
The queue was signaling a pop that's waiting for the queue to not be
empty before we had actually added something to the queue. This change
moves the signal to after the push has been done so we're not signaling
a pop with a still-empty queue.
Needed for fixing https://github.com/ghostty-org/ghostty/issues/6734
This reverts commit 3a70d898d5ef52b61f3cae03c5ebab0aa9749e05.
Squash this commit once upstream zg has accepted a PR which updates for
recent zig
Some terminals (foot, ghostty) encode shift + space as CSI 32 ; 2 u when
using the kkp disambiguate flag. We need to handle this as a printable
character. Use the logic from vaxis (the go version), which checks if
the mods were shift only and the character is printable. Then we upper
case it, set the text and the shifted char
Implement the kitty scaled text extension. We do this by adding a Scale
struct to the core Cell structure. The scale struct defines the scale,
numerator, denominator, and vertical positioning. We also query
independently for scaled text vs explicit width text.
Users of scaled text must be very careful of how they model their cells,
as cells must be written ahead of time with knowledge of the
capabilities of the underlying terminal. Libvaxis does not move contents
of cells based on scale (ie 3 contiguous cells of scale=2 with contents
"abc" will not transform into what you think - the user of the library
must take car to put a, b, and c into appropriate cells. Libvaxis will
do the work to prevent overwriting the cell). Capability can be checked
in the vx.caps.scaled_text value.
Some terminals (foot, ghostty) encode shift + space as CSI 32 ; 2 u when
using the kkp disambiguate flag. We need to handle this as a printable
character. Use the logic from vaxis (the go version), which checks if
the mods were shift only and the character is printable. Then we upper
case it, set the text and the shifted char