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/normal.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/normal.zig') diff --git a/src/normal.zig b/src/normal.zig index 1209fb1e..96c61fba 100644 --- a/src/normal.zig +++ b/src/normal.zig @@ -827,7 +827,7 @@ fn executeNormalAction(p: *Pardes, t: *Text, a: modal.Normal.Action) void { .increment => return edit.normalAdjustNumber(p, t, @intCast(a.count)), .decrement => return edit.normalAdjustNumber(p, t, -@as(i64, @intCast(a.count))), .leader => if (p.macro.replaying == 0) { - p.leader_on = true; + p.prefix = .leader; p.leader_n = 0; }, // `:` is the one key a tag and a body do not share: it moves the -- cgit v1.3