From f4e23f5c47bd2b9bb38d5d3603ba08be625a7750 Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Wed, 17 Apr 2024 21:52:11 -0700 Subject: [PATCH] config: restore window-inherit-working-directory defaults This setting previously defaulted to `true`, so flip all of our packed booleans on by default. Also, note that the granular values are only supported on macOS. --- src/config/Config.zig | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/config/Config.zig b/src/config/Config.zig index 1efab929cc..981697fcab 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -642,9 +642,11 @@ keybind: Keybinds = .{}, /// focused, the default working directory will be used (the `working-directory` /// option). /// -/// Value value are `split`, `tab`, and `window`. You can specify multiple +/// Valid values are `split`, `tab`, and `window`. You can specify multiple /// values using a comma-delimited string (`tab` or `split,window`). You /// can also set this to `true` (always inherit) or `false` (never inherit). +/// +/// `split`, `tab`, and `window` are currently only supported on macOS. @"window-inherit-working-directory": WindowInheritWorkingDirectory = .{}, /// If true, new windows and tabs will inherit the font size of the previously @@ -3498,9 +3500,9 @@ pub const WindowNewTabPosition = enum { pub const WindowInheritWorkingDirectory = packed struct { const Self = @This(); - split: bool = false, - tab: bool = false, - window: bool = false, + split: bool = true, + tab: bool = true, + window: bool = true, pub fn parseCLI(self: *Self, _: Allocator, input: ?[]const u8) !void { const value = input orelse return error.ValueRequired; @@ -3517,7 +3519,7 @@ pub const WindowInheritWorkingDirectory = packed struct { } // Enable all of the fields named in the comma-separated value. - self.* = .{}; + self.* = .{ .split = false, .tab = false, .window = false }; var iter = std.mem.splitSequence(u8, value, ","); loop: while (iter.next()) |part_raw| { const part = std.mem.trim(u8, part_raw, whitespace);