aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/unicode/props.zig
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/unicode/props.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/unicode/props.zig')
-rw-r--r--vendor/libghostty-vt/src/unicode/props.zig14
1 files changed, 12 insertions, 2 deletions
diff --git a/vendor/libghostty-vt/src/unicode/props.zig b/vendor/libghostty-vt/src/unicode/props.zig
index 2653f0cc..dd6a4dbb 100644
--- a/vendor/libghostty-vt/src/unicode/props.zig
+++ b/vendor/libghostty-vt/src/unicode/props.zig
@@ -7,7 +7,7 @@
const std = @import("std");
const uucode = @import("uucode");
-pub const Properties = packed struct {
+pub const Properties = packed struct(u16) {
/// Codepoint width. We clamp to [0, 2] since Ghostty handles control
/// characters and we max out at 2 for wide characters (i.e. 3-em dash
/// becomes a 2-em dash).
@@ -18,11 +18,21 @@ pub const Properties = packed struct {
width_zero_in_grapheme: bool = false,
/// Grapheme break property.
- grapheme_break: uucode.x.types.GraphemeBreakNoControl = .other,
+ grapheme_break: uucode.types.GraphemeBreakNoControl = .other,
/// Emoji VS compatibility
emoji_vs_base: bool = false,
+ /// Explicit padding to give the struct a power-of-two backing integer.
+ /// This is a performance workaround: with a non-power-of-two backing
+ /// integer (u9), Zig 0.16 lowers loads/stores of this struct through
+ /// mismatched exotic-width LLVM integer types (store i9 / load i16),
+ /// which blocks LLVM from promoting temporaries to registers and forces
+ /// stack round-trips in hot paths like `graphemeBreak`. See
+ /// https://github.com/ziglang/zig/issues/21891 for the upstream issue.
+ /// The size of the lookup table is unchanged (@sizeOf was already 2).
+ _padding: u7 = 0,
+
// Needed for lut.Generator
pub fn eql(a: Properties, b: Properties) bool {
return a.width == b.width and