From a9de2b51ab76a43250a4d6c41a0ddd54e6970049 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 09:16:36 -0300 Subject: Let the keyboard reach a tag's path, read-only The tag's computed path, dirty marker and page were out of the keyboard's reach: its cursor lived in the text after them. It now lives in the tag as shown, as in acme where the name is ordinary text at the start of the tag, so `0` goes to the line's start and motions select and yank the path. The path stays read-only: an edit that would change it is refused and leaves the cursor where it was, and typing into a file's path drafts a new name as a click on it does. Sync moves the tag's positions when the prefix changes length, so a rename or the dirty marker still never moves the cursor off the text after it. Co-Authored-By: Claude Opus 5.5 --- src/panes.zig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/panes.zig') diff --git a/src/panes.zig b/src/panes.zig index a67aa8ac..ab4f5072 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -133,6 +133,11 @@ pub const Pane = struct { /// scrolls to keep its caret in view while it has the keyboard; pointer /// rows count from this line, not the tag's first. tag_top: u16 = 0, + /// How long the tag's computed prefix was when its positions were last + /// placed. They count from the start of the prefix, so when it grows or + /// shrinks (a rename, the dirty marker, a PDF's page) what follows it + /// moves with it. + tag_lead: usize = 0, cwd: Cwd = .none, hscroll: i32 = 0, // Visible rows map to source lines and raw/display column origins. -- cgit v1.3