From 6decf23fe8ac1ce6b48dac42a3502900f6e251b7 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 7 Nov 2026 01:02:25 -0300 Subject: follow: `Follow` (SPC c f) is Emacs's follow-mode, one text across a chain of Zerox twins shown in column order as consecutive pages (File.followChain, which syncTwins runs only for a twin group holding a chain): a scroll of any page reflows the others from it, the keyboard's page leaves its inner edges to the cursor, which goes on into the next page rather than scrolling it, the chain's ends scroll it as one pane, `Unfollow` on a follower's tag (or Del) takes a pane out, and the chain is a twin's `follow` flag with each view's `follow_scroll`, so a dump, Restore and replicas carry it; test/behaviour/follow.zig and follow.snap pin it, the reference, guide, changelog and builtins-json say it, and the builtins, leader and ttyhelp goldens list SPC c f Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/views.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/views.zig') diff --git a/src/views.zig b/src/views.zig index 354ae0d0..953b39a4 100644 --- a/src/views.zig +++ b/src/views.zig @@ -33,7 +33,7 @@ pub const max = 4; /// A pane's fields that are each view's own: where it is in the view's /// layout, which of its texts has the keyboard, how far it is scrolled, and /// what the view's step measured of it (its tag's rows, its bands). -const pane_fields = [_][:0]const u8{ "focus", "vweight", "collapsed", "attached_to", "hscroll", "tag_scroll", "tag_top", "tag_rows", "view", "notices", "pan" }; +const pane_fields = [_][:0]const u8{ "focus", "vweight", "collapsed", "attached_to", "hscroll", "tag_scroll", "tag_top", "tag_rows", "view", "notices", "pan", "follow_scroll" }; /// The body's: its cursor, selections and mode. Its undo stays the pane's. const body_fields = [_][:0]const u8{ "mode", "cur_pinned", "cur_row", "cur_col", "vsel", "sels", "nsel", "select", "sticky_col", "restore_cursor", "last_edit", "reg_wait", "normal", "find_op", "find_ch" }; @@ -51,6 +51,7 @@ pub const PaneView = struct { view: Pane.SessionView = .{}, notices: Pane.Notices = .{}, pan: u16 = 0, + follow_scroll: usize = 0, body: Part(Text, &body_fields) = .{}, /// A document's scroll and size; a terminal's size is its pty's, which /// every view shows (sized by its last typist, `Pardes.sync`). -- cgit v1.3