diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-04 23:08:21 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-04 23:08:21 -0300 |
| commit | 006c246f876317323e64b15922217693715cd7d4 (patch) | |
| tree | 61fc85875843ddb9657cef684626cc32a37936bb /src/config.zig | |
| parent | 398270fb7e121cbaab9e264a39bc83b5d32c40c7 (diff) | |
| download | pardes-006c246f876317323e64b15922217693715cd7d4.tar.gz pardes-006c246f876317323e64b15922217693715cd7d4.zip | |
config: User.path's Windows branch and its two test guards go (build.zig's Platform has no Windows), with recent_buffer, which nothing named, and toggleTransition, inlined at its one caller
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/config.zig')
| -rw-r--r-- | src/config.zig | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/config.zig b/src/config.zig index 9d5f392d..a3cf659c 100644 --- a/src/config.zig +++ b/src/config.zig @@ -560,7 +560,6 @@ pub const help_buffer = "+Help"; pub const dump_config_buffer = "+DumpConfig"; pub const effect_code_buffer = "+EffectCode"; pub const jumps_buffer = "+Jumps"; -pub const recent_buffer = "+Recent"; pub const preview_buffer = "+Preview"; pub const unsaved_buffer = "+Unsaved"; pub const themes_buffer = "+Themes"; @@ -1002,11 +1001,6 @@ pub const Runtime = struct { } }; - pub fn toggleTransition(state: *Runtime, effect: animation.Transition) void { - std.debug.assert(effect != .off); - state.panel_transition = if (state.panel_transition == effect) .off else effect; - } - pub const tagline_percent_min: u8 = 1; pub const tagline_percent_max: u8 = 100; @@ -1307,7 +1301,7 @@ pub const Runtime = struct { .transition => |effect| { const want = switchedTo(argument) catch return false; if (want == null) { - state.toggleTransition(effect); + state.panel_transition = if (state.panel_transition == effect) .off else effect; } else if (want.?) { state.panel_transition = effect; } else if (state.panel_transition == effect) { @@ -2021,14 +2015,6 @@ pub const User = struct { // Relative XDG_CONFIG_HOME values are ignored. pub fn path(gpa: std.mem.Allocator, env: *const std.process.Environ.Map) !?[]u8 { - if (builtin.os.tag == .windows) { - if (env.get("LOCALAPPDATA")) |base| if (base.len != 0) - return try std.fs.path.join(gpa, &.{ base, "pardes" }); - if (env.get("USERPROFILE")) |home| if (home.len != 0) - return try std.fs.path.join(gpa, &.{ home, "AppData", "Local", "pardes" }); - return null; - } - if (env.get("XDG_CONFIG_HOME")) |base| if (base.len != 0 and std.fs.path.isAbsolute(base)) return try std.fs.path.join(gpa, &.{ base, "pardes" }); @@ -2061,8 +2047,6 @@ pub const User = struct { } test "config path honors XDG and rejects a relative XDG directory" { - if (builtin.os.tag == .windows) return; - var env: std.process.Environ.Map = .init(std.testing.allocator); defer env.deinit(); try env.put("HOME", "/home/pardes-test"); @@ -2083,8 +2067,6 @@ pub const User = struct { } test "config loader reads init inside the config directory" { - if (builtin.os.tag == .windows) return; - var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); var base_buf: [std.fs.max_path_bytes]u8 = undefined; |
