mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-29 18:41:40 +00:00
Update to Zig 0.16.0
This commit represents the majority of the work necessary to upgrade Ghostty to use Zig 0.16.0. Key parts: * In addition to its previous responsibilities, the global state now houses state for global I/O implementations and the process environment. It is now also utilized in the main application along with the C library. Where necessary, global state is isolated from key parts of the implementation (e.g., in libghostty subsystems), and it's expected that this list will grow. * We currently manage our own C translation layer where necessary. In these cases, cImport has been removed in favor of the new external translate-c package. Due to fixes that have needed be made to properly translate the dependencies that were swapped out, as mentioned, we have had to backport fixes from the current translate-c package (and the upstream Arocc dependency). We will host this ourselves until Zig 0.17.0 is released with these fixes. * Where necessary (only a small number of cases), some stdlib code from 0.15.2 (and even from 0.17.0) has been taken, adopted, and vendored in lib/compat. Co-authored-by: Leah Amelia Chen <hi@pluie.me>
This commit is contained in:
@@ -70,7 +70,8 @@ pub fn style(
|
||||
test "cursor: default uses configured style" {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
var term: terminal.Terminal = try .init(alloc, .{ .cols = 10, .rows = 10 });
|
||||
const io = testing.io;
|
||||
var term: terminal.Terminal = try .init(io, alloc, .{ .cols = 10, .rows = 10 });
|
||||
defer term.deinit(alloc);
|
||||
|
||||
term.screens.active.cursor.cursor_style = .bar;
|
||||
@@ -89,7 +90,8 @@ test "cursor: default uses configured style" {
|
||||
test "cursor: blinking disabled" {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
var term = try terminal.Terminal.init(alloc, .{ .cols = 10, .rows = 10 });
|
||||
const io = testing.io;
|
||||
var term = try terminal.Terminal.init(io, alloc, .{ .cols = 10, .rows = 10 });
|
||||
defer term.deinit(alloc);
|
||||
|
||||
term.screens.active.cursor.cursor_style = .bar;
|
||||
@@ -108,7 +110,8 @@ test "cursor: blinking disabled" {
|
||||
test "cursor: explicitly not visible" {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
var term = try terminal.Terminal.init(alloc, .{ .cols = 10, .rows = 10 });
|
||||
const io = testing.io;
|
||||
var term = try terminal.Terminal.init(io, alloc, .{ .cols = 10, .rows = 10 });
|
||||
defer term.deinit(alloc);
|
||||
|
||||
term.screens.active.cursor.cursor_style = .bar;
|
||||
@@ -128,7 +131,8 @@ test "cursor: explicitly not visible" {
|
||||
test "cursor: always block with preedit" {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
var term = try terminal.Terminal.init(alloc, .{ .cols = 10, .rows = 10 });
|
||||
const io = testing.io;
|
||||
var term = try terminal.Terminal.init(io, alloc, .{ .cols = 10, .rows = 10 });
|
||||
defer term.deinit(alloc);
|
||||
|
||||
var state: terminal.RenderState = .empty;
|
||||
|
||||
Reference in New Issue
Block a user