aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/os/macos.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/os/macos.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/os/macos.zig')
-rw-r--r--vendor/libghostty-vt/src/os/macos.zig17
1 files changed, 7 insertions, 10 deletions
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" {