summaryrefslogtreecommitdiff
path: root/core/Core.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-19 20:34:29 -0300
committerGabriel Schneider <[email protected]>2026-11-19 21:02:38 -0300
commit0d5c7d937c7d592ac7f3a9a8253993bffa283288 (patch)
tree987c668d92cb3b0a954e5aab32c180df924c2d0c /core/Core.zig
parent0db34fbf28e70c8c6a3c6025c0888fc5ec75201c (diff)
downloadpardes-0d5c7d937c7d592ac7f3a9a8253993bffa283288.tar.gz
pardes-0d5c7d937c7d592ac7f3a9a8253993bffa283288.zip
core, dev, runtime, test: the settings a session changes while it runs are `config.Settings`, no longer `config.Runtime` (P18, the user's ruling on the tree step's name collisions: the type's name collided with the directory `runtime/`, and the core's field of that type is already `settings`): the type on 17 lines of core/config.zig (its declaration, its methods' receivers, its tests, the comment naming it), `config.Settings` on 50 lines of eleven other files (core/Core.zig, Output.zig, builtins.zig, builtins_json.zig, exec.zig, ninep/ctl.zig, surface.zig; dev/gui/gui.zig 598, 5860, 5909; dev/jump_trail.zig's comment; runtime/main.zig 756; test/output.zig 552) and docs/next-winmode.md's one mention; a rename only, nothing else on any line; the semantics hash does not move (a type's name is not in the tape's shape); tui core-test 848/991 (143 skipped), shell-test 1027/1030, gui unit-test 1625/1629 failing only the perf check's BaselineHarnessMismatch (as the base), the macOS library for Linux and aarch64-macos and the FreeBSD cross-build rc 0, under a load of 6 to 42
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/Core.zig')
-rw-r--r--core/Core.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/Core.zig b/core/Core.zig
index d5a990e2..e9f4f0e4 100644
--- a/core/Core.zig
+++ b/core/Core.zig
@@ -288,7 +288,7 @@ session_home: [limits.host_path_cap]u8 = undefined,
session_home_len: ?u16 = null,
session_shell: [limits.host_path_cap]u8 = undefined,
session_shell_len: u16 = 0,
-settings: config.Runtime = .{ .font = .{ .tagline_percent = config.gui_tagline_font_percent } },
+settings: config.Settings = .{ .font = .{ .tagline_percent = config.gui_tagline_font_percent } },
locations_config: locations.Config = .{},
locations_cache: locations.Cache = .{},
tty_filter_palette: pardes.Term.FilterPalette = .{},
@@ -296,10 +296,10 @@ font_request_taken: bool = false,
custom_theme: ?Theme = null,
/// bodyChrome's: the theme it was worked out for, and it.
body_chrome: ?struct { theme: Theme, chrome: ChromeTheme } = null,
-theme_file_path: config.Runtime.Text(limits.host_path_cap) = .{},
+theme_file_path: config.Settings.Text(limits.host_path_cap) = .{},
/// The ThemeFile last loaded whole: what /ctl and DumpConfig name, and
/// what a failed ThemeFile goes back to (colors.revertThemeFile).
-theme_file_loaded: config.Runtime.Text(limits.host_path_cap) = .{},
+theme_file_loaded: config.Settings.Text(limits.host_path_cap) = .{},
theme_file_generation: u32 = 0,
theme_file_pane: u8 = 0,
chrome: colors.ChromeTheme = colors.initial_chrome,
@@ -1102,7 +1102,7 @@ fn observeFontInner(
p: *Pardes,
effective_name: []const u8,
effective_size_hundredths: u16,
- unit: config.Runtime.FontSizeUnit,
+ unit: config.Settings.FontSizeUnit,
) bool {
if (!p.settings.font.effective_name.set(effective_name)) return false;
p.settings.font.effective_size_hundredths = effective_size_hundredths;
@@ -1117,7 +1117,7 @@ fn acknowledgeFontInner(
p: *Pardes,
effective_name: []const u8,
effective_size_hundredths: u16,
- unit: config.Runtime.FontSizeUnit,
+ unit: config.Settings.FontSizeUnit,
) bool {
if (!p.settings.font.pending or !p.font_request_taken) return false;
const changed = !std.mem.eql(
@@ -3423,7 +3423,7 @@ test "Font keeps requested and acknowledged faces as separate plain state" {
try std.testing.expect(!p.settings.font.pending);
try std.testing.expectEqualStrings(installed[0].name, p.settings.font.effective_name.get());
try std.testing.expectEqual(@as(u16, 1375), p.settings.font.effective_size_hundredths);
- try std.testing.expectEqual(config.Runtime.FontSizeUnit.pixels, p.settings.font.effective_size_unit);
+ try std.testing.expectEqual(config.Settings.FontSizeUnit.pixels, p.settings.font.effective_size_unit);
try std.testing.expect(!p.acknowledgeFont("Duplicate Ack", 1400, .pixels));
try std.testing.expect(p.executeBuiltinLine(p.view().active, cmd));