From 5b135dc60d4e9f77be0a4f883439f3200ac30d30 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 20:53:34 -0300 Subject: fields #40, a key prefix is one enum: leader_on and ctrl_w_pending, never both, are the session's prefix (none, leader or window); handleKey's three writes of both are one each, and the reads say p.prefix == .leader (Messages.zig, normal.zig, pdf_view.zig, config.zig's test; gui.zig's leader chip on a test step); views.zig's per-view fields name prefix; a dump written before this change loads it as the default once: an Upgrade or Restore from it comes back with no prefix pending, and the wire's semantics change; gates on tui: core-test 960/960, behaviour-test 238/238, pane-test 171/172 (1 skipped), snap all 108 scripts ok; gui unit-test 1518/1519 (1 skipped) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/config.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/config.zig') diff --git a/src/config.zig b/src/config.zig index 4b56cfa7..1c4e92a1 100644 --- a/src/config.zig +++ b/src/config.zig @@ -206,9 +206,9 @@ test "Space-k is unbound while Exit, Kill and other k chords remain available" { pane.body.cur_row = 1; while (p.nextEffect()) |_| {} p.update(.{ .key = .{ .cp = ' ' } }); - try std.testing.expect(p.leader_on); + try std.testing.expect(p.prefix == .leader); p.update(.{ .key = .{ .cp = 'k' } }); - try std.testing.expect(!p.leader_on and !p.quit); + try std.testing.expect(p.prefix != .leader and !p.quit); try std.testing.expectEqual(@as(i32, 1), pane.body.cur_row); while (p.nextEffect()) |effect| try std.testing.expect(effect != .quit); p.update(.{ .key = .{ .cp = 'k' } }); -- cgit v1.3