From 3ebdbe26a14546f8e4ee06462850aad85f1c9646 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 22:59:25 -0300 Subject: settings #3, the terminal's three go, each the value it had by default: Pager (a terminal's shell pages into a +Pager where the environment names no pager, so PAGER and GIT_PAGER set by the user are what an opt-out is; host_io's Paging.terminal_off goes), PagerColor (a +Pager keeps its program's colours; pager.parse loses its colour argument, its callers in Core.zig and ninep/ctl.zig with it) and TermImages (a new terminal draws its images as pixels where it can, Petscii still flips one; terminal.adoptSettings and its call in panes.zig go); deleted tests: "settings: Pager is pardes by default, off taken, anything else refused with its choices" and "PagerColor off: the same text, no spans, overstrike included" (the man page's overstrike case pins what stays); rewritten: TermImages' test as a new terminal drawing pixels, ctl's pager test with the second +Pager keeping its colours, host_io's environment test for the one terminal paging, process/tree's /commands row on Wrap; the reference, setup and changelog say an environment's PAGER is the way out; no golden changes; gates on tui: core-test 964/964, behaviour-test 241/241, unit-test 1480/1481, pane-test 171/172, snap all 105 scripts ok, process-test 0 of 37 failed; gui unit-test 1524/1525 Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/config.zig | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'src/config.zig') diff --git a/src/config.zig b/src/config.zig index edfaf3ed..3d5de631 100644 --- a/src/config.zig +++ b/src/config.zig @@ -117,9 +117,6 @@ pub const leader_path = paths: { .Search = null, .Panes = null, .More = null, - .Pager = null, - .PagerColor = null, - .TermImages = null, .JumpScope = null, .Debug = "td", .Msg = null, @@ -740,17 +737,6 @@ pub const Runtime = struct { tagline_percent: u8 = 100, } = .{}, - /// What a terminal's shell pages through (host_io.ChildEnv): `pardes`, - /// PAGER and GIT_PAGER set to `pardes -`, a +Pager pane, where the - /// user's environment set neither; `off`, the environment as it is. - pager: Pager = .pardes, - /// A +Pager keeps its program's colours (SGR, as spans over the text, - /// pager.zig), or is plain; for the next text paged. - pager_color: bool = true, - /// How a new terminal pane draws the kitty graphics its program sends - /// (yazi's previews): `real`, as pixels where the shell can, or - /// `petscii`, as glyph art. The Petscii builtin flips one pane. - term_images: TermImages = .real, /// What Back and Forward keep to (Jump.jumpBy): `file`, the places in /// the focused pane's file first, other files only once those run out /// that way; `all`, every place in the order it was jumped to. @@ -769,13 +755,11 @@ pub const Runtime = struct { /// +Preview with): it never resizes itself after. search_rows: u16 = 8, - pub const Pager = enum { pardes, off }; - pub const TermImages = enum { real, petscii }; pub const JumpScope = enum { file, all }; pub const SearchPlace = enum { attached, column }; pub const SearchPane = enum { reuse, new }; /// A setting that is one of a few words, each an enum field of Runtime. - pub const Choice = enum { pager, term_images, jump_scope, search_place, search_pane, pet }; + pub const Choice = enum { jump_scope, search_place, search_pane, pet }; pub const Pet = enum { off, cat, frog }; pub const tagline_percent_min: u8 = 1; @@ -845,7 +829,7 @@ pub const Runtime = struct { pub const Capability = std.meta.FieldEnum(Capabilities); - pub const Toggle = enum { wrap, debug, pager_color, verbose, cursor_blink, jump_trail, program_esc }; + pub const Toggle = enum { wrap, debug, verbose, cursor_blink, jump_trail, program_esc }; pub const Action = union(enum) { toggle: Toggle, @@ -917,9 +901,6 @@ pub const Runtime = struct { .{ .word = "TaglineSize", .action = .tagline_size, .doc = "Scale the tag font, a percentage." }, .{ .word = "WindowOpacity", .action = .window_opacity, .doc = "The window's opacity, a percentage." }, .{ .word = "WindowBlur", .action = .window_blur, .doc = "The blur behind a translucent window, a radius." }, - .{ .word = "Pager", .action = .{ .choice = .pager }, .doc = "What a terminal's commands page through: pardes, a +Pager pane (pardes -), or off, the environment's own; for terminals started after it." }, - .{ .word = "PagerColor", .action = .{ .toggle = .pager_color }, .doc = "A +Pager keeps its program's colours, on or off; for the next text paged." }, - .{ .word = "TermImages", .action = .{ .choice = .term_images }, .doc = "How a new terminal draws its program's kitty graphics: real, as pixels where it can, or petscii, as glyph art." }, .{ .word = "JumpScope", .action = .{ .choice = .jump_scope }, .doc = "What Back and Forward keep to: file, the focused pane's file until it runs out that way, or all, every place in order." }, .{ .word = "CallstackDepth", .action = .callstack_depth, .doc = "Caller levels collected by Callstack, 1 through 64; default 8. Bare, it says the current limit." }, .{ .word = "Tab", .action = .tab, .doc = "A tab's width in cells, 1 through 16, in every pane; bare, it says the width." }, @@ -1332,7 +1313,7 @@ pub const Runtime = struct { }; const values = [_][2][]const u8{ .{ "TaglineSize", "73" }, .{ "WindowOpacity", "85" }, .{ "WindowBlur", "40" }, - .{ "MessageLinger", "1500" }, .{ "DumpDir", "~/dumps" }, .{ "TermImages", "petscii" }, + .{ "MessageLinger", "1500" }, .{ "DumpDir", "~/dumps" }, .{ "JumpScope", "all" }, .{ "SearchPlace", "column" }, .{ "SearchPane", "new" }, .{ "GripWidth", "200" }, .{ "InactiveDim", "35" }, .{ "CallstackDepth", "16" }, .{ "Tab", "8" }, .{ "SearchRows", "12" }, -- cgit v1.3