From f930d53c58187381b2f0df6892546ac1c217c9db Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 22:27:44 -0300 Subject: settings #1, Tagbottom goes, a pane's tag at its head the one value anyone used: layout.bodyTop and tagTop, mouse's seam and clampBorderRow, applyRowSplit, body_layer's copy and the tests' row arithmetic lose their other arm (reads deleted in Core.zig, layout.zig, mouse.zig, draw.zig, gui.zig, macos.zig, whose ABI slot 11 says 0 now, and ninep/events.zig, ninep/tree.zig, look.zig, Messages.zig), with the registry row, SPC t b, Help, /commands, the builtins JSON and the reference row; deleted: the snapshot scripts tagbottom, tagbottomshort and tagbottomimage with their goldens, the behaviour test "placement: under Tagbottom a look from a pane's text goes under its text too", the window scene 10-tagbottom with its gui-goldens line and the macOS parity check tags-bottom; tests that ran both ends of the tag run the head; a dump that kept the field loads without it; perf.zig's harness id moves in the two debug baselines (its reads of the field went); the window scenes after 10-tagbottom (12 to 15, 17) take new gui-goldens lines, the two Tagbottom writes gone from the scene and with them their words on the message row (the base window build running the same scenes gives the same frames); gates on tui: core-test 966/966, behaviour-test 243/243, unit-test 1484/1485, pane-test 171/172, snap all 105 scripts ok, process-test 0 of 37 failed; gui unit-test 1529/1530, gui-golden 0 of 1 failed Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/gui/gui.zig | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/gui') diff --git a/src/gui/gui.zig b/src/gui/gui.zig index f9b757f8..7c042703 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -1018,7 +1018,7 @@ const Gui = struct { scroll_pane: ?usize = null, scroll_rect: pardes.Rect = .{ .x = 0, .y = 0, .w = 0, .h = 0 }, - scroll_body_y: u16 = 0, // that rect's first BODY row (Tagbottom moves it) + scroll_body_y: u16 = 0, // that rect's first BODY row scroll_body_h: u16 = 0, // and its BODY rows, which a taller tag leaves fewer of scroll_held_px: f32 = 0, // its tree-sitter context band, which never moves scroll_col: u16 = 0, // where the wheel turned: crossed rows are delivered @@ -5801,7 +5801,6 @@ test "the layer cover is the per-cell layer scan, over a core's layouts and rand var cover: [97 * 31]Cover = undefined; var notices = false; for (0..32) |step| { - core.settings.tag_bottom = step & 1 != 0; if (step & 3 == 0) try std.testing.expect(core.executeBuiltinLine(2, "Collapse")); core.prefix = if (step & 4 != 0) .leader else .none; if (step & 8 != 0) { @@ -6141,8 +6140,7 @@ test "every pixel of a grip column is band, button or ring, and the button sits const pane = try core.setTestFile(std.mem.asBytes(&@as([60][5]u8, @splat("text\n".*)))); pane.tag.own = try gpa.dupe(u8, "second\nthird"); core.newScratchBelow(0); - for ([_]struct { w: u32, h: u32, tag: u32 }{ .{ .w = 10, .h = 20, .tag = 12 }, .{ .w = 17, .h = 35, .tag = 30 }, .{ .w = 9, .h = 19, .tag = 15 }, .{ .w = 12, .h = 24, .tag = 24 } }) |m| for ([_]bool{ false, true }) |bottom| for ([_]usize{ 0, 1 }) |focus| for ([_]bool{ false, true }) |dirty| { - core.settings.tag_bottom = bottom; + for ([_]struct { w: u32, h: u32, tag: u32 }{ .{ .w = 10, .h = 20, .tag = 12 }, .{ .w = 17, .h = 35, .tag = 30 }, .{ .w = 9, .h = 19, .tag = 15 }, .{ .w = 12, .h = 24, .tag = 24 } }) |m| for ([_]usize{ 0, 1 }) |focus| for ([_]bool{ false, true }) |dirty| { core.active = focus; pane.file.?.revision = pane.file.?.saved_revision + @intFromBool(dirty); core.sync(); @@ -6208,11 +6206,11 @@ test "every pixel of a grip column is band, button or ring, and the button sits // Under the first row there is no button: band and rules only. if (n / w_px >= m.h and n / w_px < h_px - 1 and !std.meta.eql(got, rgb(band)) and !std.meta.eql(got, rgb(chrome.border))) return error.TestButtonUnderFirstRow; - if (!known) std.debug.print("sliver {any} at {d},{d} of {d}x{d} (metrics {d}x{d}/{d}, bottom {}, focus {d}, dirty {}) page {any}\n", .{ got, n % w_px, n / w_px, w_px, h_px, m.w, m.h, m.tag, bottom, focus, dirty, s.chrome.page }); + if (!known) std.debug.print("sliver {any} at {d},{d} of {d}x{d} (metrics {d}x{d}/{d}, focus {d}, dirty {}) page {any}\n", .{ got, n % w_px, n / w_px, w_px, h_px, m.w, m.h, m.tag, focus, dirty, s.chrome.page }); try std.testing.expect(known); } // The rule under the tag runs unbroken across the grip column. - if (!bottom) for (pixels[(h_px - 1) * w_px ..][0..w_px]) |pixel| + for (pixels[(h_px - 1) * w_px ..][0..w_px]) |pixel| try std.testing.expectEqual(rgb(chrome.tag_rule orelse mixRgb(chrome.tag_bg, chrome.page orelse bg_default)), pixel.?); // The button's edges are the scrollbar's. const button = gripButton(&g, chrome, grip.rect.x, grip.rect.y, layout); -- cgit v1.3