diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-01 23:05:23 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-01 23:05:51 +0300 |
| commit | 5bd21b7ed468b5ff4d1a5b2ed7e211f401eb138a (patch) | |
| tree | 672fa4625cca0ecb3e9376fc7f8e33d7b0e9deef /vendor/libghostty-vt/src/terminal/point.zig | |
| parent | 32abb3776668ee768200019c170956f67fe33a86 (diff) | |
chore: update libghostty vendor
refs #276
Diffstat (limited to 'vendor/libghostty-vt/src/terminal/point.zig')
| -rw-r--r-- | vendor/libghostty-vt/src/terminal/point.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/src/terminal/point.zig b/vendor/libghostty-vt/src/terminal/point.zig index 4297bf5b..f6bf25c3 100644 --- a/vendor/libghostty-vt/src/terminal/point.zig +++ b/vendor/libghostty-vt/src/terminal/point.zig @@ -76,6 +76,16 @@ pub const Point = union(Tag) { pub const C = c_union.C; pub const CValue = c_union.CValue; pub const cval = c_union.cval; + + /// Convert a C ABI point into the native Zig tagged union. + pub fn fromC(pt: C) Point { + return switch (pt.tag) { + .active => .{ .active = pt.value.active }, + .viewport => .{ .viewport = pt.value.viewport }, + .screen => .{ .screen = pt.value.screen }, + .history => .{ .history = pt.value.history }, + }; + } }; pub const Coordinate = extern struct { |
