From 425c86179791cd32e2d4ce0ae7f269940b4b0663 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Thu, 10 Sep 2026 21:51:57 +0300 Subject: chore: upgrade libghostty and preserve terminal behavior (#3906) --- vendor/libghostty-vt/src/os/macos.zig | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'vendor/libghostty-vt/src/os/macos.zig') diff --git a/vendor/libghostty-vt/src/os/macos.zig b/vendor/libghostty-vt/src/os/macos.zig index fcd1c3e5..b59882d7 100644 --- a/vendor/libghostty-vt/src/os/macos.zig +++ b/vendor/libghostty-vt/src/os/macos.zig @@ -28,7 +28,7 @@ pub fn appSupportDir( return try commonDir( alloc, .NSApplicationSupportDirectory, - &.{ build_config.bundle_id, sub_path }, + sub_path, ); } @@ -43,7 +43,7 @@ pub fn cacheDir( return try commonDir( alloc, .NSCachesDirectory, - &.{ build_config.bundle_id, sub_path }, + sub_path, ); } @@ -110,7 +110,7 @@ pub const NSSearchPathDomainMask = enum(c_ulong) { fn commonDir( alloc: Allocator, directory: NSSearchPathDirectory, - sub_paths: []const []const u8, + sub_path: []const u8, ) (error{AppleAPIFailed} || Allocator.Error)![]const u8 { comptime assert(builtin.target.os.tag.isDarwin()); @@ -140,13 +140,10 @@ fn commonDir( return error.AppleAPIFailed; const base_dir = std.mem.sliceTo(c_str, 0); - // Create a new array with base_dir as the first element - var paths = try alloc.alloc([]const u8, sub_paths.len + 1); - paths[0] = base_dir; - @memcpy(paths[1..], sub_paths); - defer alloc.free(paths); - - return try std.fs.path.join(alloc, paths); + return try std.fs.path.join( + alloc, + &.{ base_dir, build_config.bundle_id, sub_path }, + ); } test "cacheDir paths" { -- cgit v1.2.3