diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 23:16:22 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 23:58:31 -0300 |
| commit | 342650183a54dcfcdce6ca4d45d6fdf48b2d1c1c (patch) | |
| tree | 1ea95aa777d8ee643cfdaa8c188a8cb8ad1f27c5 /src/config.zig | |
| parent | 3ebdbe26a14546f8e4ee06462850aad85f1c9646 (diff) | |
| download | pardes-342650183a54dcfcdce6ca4d45d6fdf48b2d1c1c.tar.gz pardes-342650183a54dcfcdce6ca4d45d6fdf48b2d1c1c.zip | |
settings #4, the three ways to place a search go, a query pane attached under the pane that asked, eight rows under its line 1 (Query.born_rows), the next search from that pane reusing it: SearchPlace, SearchPane and SearchRows, and with SearchPlace's column the finder column itself, src/Finder.zig and its reads (Core.zig's finder field, pardes.zig's export, views.zig's per-view and laid-out field names, panes.zig's emptied column, exec.placeNew's away column, and layout.zig's compute share, setColumnPairWidth, dropColumnUnannounced's heir and newColumn), with ctl's SearchRows check and the requiresArg and applySettingBuiltin arms; deleted tests: "SearchPlace column: query panes stack in a finder column at the right edge, nothing else moves after it opens, and it goes with its last pane" (Finder.zig) and the SearchPane new half of Query's "* seeds line 1" test; root_ctl's number refusal is Tab's range now; the guide says eight rows; a dump that kept the finder or the three fields loads without them; no golden changes; gates on tui: core-test 963/963, behaviour-test 241/241, unit-test 1479/1480, pane-test 171/172, snap all 105 scripts ok, process-test 0 of 37 failed; gui unit-test 1523/1524
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/config.zig')
| -rw-r--r-- | src/config.zig | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/config.zig b/src/config.zig index 3d5de631..6f45adba 100644 --- a/src/config.zig +++ b/src/config.zig @@ -111,9 +111,6 @@ pub const leader_path = paths: { .Newcol = "cn", .Delcol = "cd", .Joincol = "cj", - .SearchPlace = null, - .SearchPane = null, - .SearchRows = null, .Search = null, .Panes = null, .More = null, @@ -745,21 +742,10 @@ pub const Runtime = struct { /// is what the drawing and the column arithmetic read). tab: u16 = tab_width, callstack_depth: u8 = @import("lsp/lsp.zig").callstack_default_depth, - /// Where a query pane goes (Query.zig): `attached`, under the pane that - /// asked, out of its rows alone; `column`, in the finder column. - search_place: SearchPlace = .attached, - /// A search from a pane that has a query pane: `reuse` it (its frozen - /// rows back on Esc), or open a `new` one, the last left where it is. - search_pane: SearchPane = .reuse, - /// The body rows a query pane is born with under its line 1 (and its - /// +Preview with): it never resizes itself after. - search_rows: u16 = 8, 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 { jump_scope, search_place, search_pane, pet }; + pub const Choice = enum { jump_scope, pet }; pub const Pet = enum { off, cat, frog }; pub const tagline_percent_min: u8 = 1; @@ -846,7 +832,6 @@ pub const Runtime = struct { grip_width, tab, callstack_depth, - search_rows, choice: Choice, }; @@ -904,9 +889,6 @@ pub const Runtime = struct { .{ .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." }, - .{ .word = "SearchPlace", .action = .{ .choice = .search_place }, .doc = "Where a query pane goes: attached, under the pane that asked, out of its rows alone, or column, in the finder column." }, - .{ .word = "SearchPane", .action = .{ .choice = .search_pane }, .doc = "A search from a pane that has a query pane: reuse it, or open a new one and leave the last where it is." }, - .{ .word = "SearchRows", .action = .search_rows, .doc = "The rows a query pane is born with under its line 1, 1 through 100; default 8. It never resizes itself." }, }; pub fn find(name: []const u8) ?Setting { @@ -988,7 +970,6 @@ pub const Runtime = struct { .grip_width => state.grip_width = number(u16, argument, " \t\r\n%", 50, 300) orelse return false, .callstack_depth => state.callstack_depth = number(u8, argument, " \t\r\n", 1, @import("lsp/lsp.zig").callstack_max_depth) orelse return false, .tab => state.tab = number(u16, argument, " \t\r\n", 1, 16) orelse return false, - .search_rows => state.search_rows = number(u16, argument, " \t\r\n", 1, 100) orelse return false, .theme, .font => return false, } return true; @@ -1022,7 +1003,6 @@ pub const Runtime = struct { .grip_width => "50-300 (a percentage)", .tab => "1-16 (cells)", .callstack_depth => "1-64 (levels)", - .search_rows => "1-100 (rows)", .tagline_size => std.fmt.comptimePrint("{d}-{d} (a percentage)", .{ tagline_percent_min, tagline_percent_max }), .message_linger => std.fmt.comptimePrint("0-{d} (milliseconds)", .{message_ms_max}), .shell => "a path of at most 255 bytes; bare, $SHELL, else /bin/sh", @@ -1112,7 +1092,7 @@ pub const Runtime = struct { else try out.print("{s} {s}\n", .{ setting.word, context.theme_name }), // A number in a field named as its action. - inline .window_opacity, .window_blur, .inactive_dim, .callstack_depth, .tab, .search_rows, .grip_width => |_, tag| try out.print("{s} {d}\n", .{ setting.word, @field(state, @tagName(tag)) }), + inline .window_opacity, .window_blur, .inactive_dim, .callstack_depth, .tab, .grip_width => |_, tag| try out.print("{s} {d}\n", .{ setting.word, @field(state, @tagName(tag)) }), .dump_dir => { const dir = if (state.dump_dir.len > 0) state.dump_dir.get() else context.default_dump_dir; if (dir.len > 0) try out.print("{s} {s}\n", .{ setting.word, dir }) else try out.print("# {s} (none)\n", .{setting.word}); @@ -1314,9 +1294,9 @@ pub const Runtime = struct { const values = [_][2][]const u8{ .{ "TaglineSize", "73" }, .{ "WindowOpacity", "85" }, .{ "WindowBlur", "40" }, .{ "MessageLinger", "1500" }, .{ "DumpDir", "~/dumps" }, - .{ "JumpScope", "all" }, .{ "SearchPlace", "column" }, .{ "SearchPane", "new" }, + .{ "JumpScope", "all" }, .{ "GripWidth", "200" }, .{ "InactiveDim", "35" }, .{ "CallstackDepth", "16" }, - .{ "Tab", "8" }, .{ "SearchRows", "12" }, + .{ "Tab", "8" }, }; for (values) |v| try std.testing.expect(apply(&state, find(v[0]).?, v[1])); try std.testing.expect(state.font.requested_name.set("Wanted Mono")); |
