Implement handling of mode 1047, which enters the alternate screen. This
is not used often, typically applications will favor 1049 (enter alt
screen, save cursor, clear alt screen).
Fixes#882
We previously had a hardcoded limit of 16 codepoints. In #882, a user
pointed out that in Chinese, is reasonable for a preedit input to be
longer than this.
To avoid any future issues, this commit moves to a heap-allocated
variant. Preedits aren't that common, they aren't high throughput, and
they're generally pretty small, so using a heap allocation is fine. The
memory is owned by the person who set it.
Fixes#895
Every loaded font face calculates metrics for itself. One of the
important metrics is the baseline to "sit" the glyph on top of. Prior to
this commit, each rasterized glyph would sit on its own calculated
baseline. However, this leads to off-center rendering when the font
being rasterized isn't the font that defines the terminal grid.
This commit passes in the font metrics for the font defining the
terminal grid to all font rasterization requests. This can then be used
by non-primary fonts to sit the glyph according to the primary grid.
This uses WCAG2 algorithms with a minimum ratio hardcoded of 3:1. This
is not shippable in its current state because we want the ratio to be
configurable and I'm not happy with the way data is being sent to the
shader.
This updates the lockfile for nixpkgs-zig-0-12 so that the latest zig is
used for building the nix package.
Note that as per history on this topic, this currently only affects the
nix package (packages.ghostty), not the devShell.
If mouse events are active and the cursor is hovered over a link,
pressing Shift does not change the cursor to a pointer, but to the text
selection shape, until the cursor is moved again. The pointer shape
should have higher priority over the text selection shape when the
cursor is hovered over a pointer.
Before this change, it would crash when you had the following surfaces
split1
/ \
/ \
surf1 \
split2
/ \
surf2 surf3
and you'd want to split `surf1` again. Splitting `surf2` or `surf3`
would be fine, but surf1 would break things.