From ea228d1b832401db8efe33a5db4099ba41d42509 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 31 Jul 2026 00:26:12 -0300 Subject: config.zig: every binding and every piece of Look syntax in one file Retargeting a key, a mouse chord or a spelling is now an edit to src/config.zig and nothing else. Three parts in reading order: pardes's own bindings (where a reader lands), the Look/Exec syntax, then the helix keymap under a banner saying hxdiff/hxparity are differential suites against real helix, so a key moved there is a divergence and not a tweak. The bindings are data a comptime loop can walk, because the builtin index is going to walk them. Duplication this cut: is/isC/isA became one hit(key, chords) over ~132 call sites, and a binding being a LIST collapses the letter-or-arrow chains; swap_enter_tab is gone, replaced by look_key/exec_key that can point anywhere; the four focus builtins' h/j/k/l lived hardcoded in two places and is now one table. No golden moved. --- src/gui/gui.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gui/gui.zig') diff --git a/src/gui/gui.zig b/src/gui/gui.zig index bca0ebb9..d8086981 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -17,6 +17,7 @@ const libc = std.c; const vaxis = @import("vaxis"); // test modes only: the stdin escape-seq parser const ghostty_vt = @import("ghostty-vt"); // 256-color palette for .index cells const pardes = @import("../pardes.zig"); +const config = @import("../config.zig"); const look = @import("../look.zig"); const deck = @import("deck.zig"); const crt = @import("crt.zig"); @@ -395,7 +396,7 @@ fn webChromeTarget(core: *const pardes.Pardes, col: u16, row: u16) ?WebChromeTar for (core.panes, 0..) |slot, id| { if (slot == null) continue; const rect = core.rects[id]; - if (row == rect.y and col >= rect.x and col < rect.x + rect.w and col < rect.x + pardes.GUTTER) + if (row == rect.y and col >= rect.x and col < rect.x + rect.w and col < rect.x + config.GUTTER) return .{ .col = col, .row = rect.y }; } -- cgit v1.3