From 1df6bd12fafbf97062f7844a23de208add75a843 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 19:36:58 -0300 Subject: A pane tag wraps onto rows and can collapse to one, as acme's does acme's frame wraps a tag at its right edge and the window grows to show every row (wind.c wintaglines); Tagup/Tagdown shrink it to one row and back. Pane tags used to be one row, scrolled sideways to the caret. Now a tag's lines wrap at its width (one cell kept for the caret past a full row) and it starts expanded; insert-mode Up on the first row collapses it, Down on the last row expands it, and Alt-Up/Alt-Down do so in either mode. A word the wrap breaks across rows is still one word to a click and a selection. Column and workspace tags keep scrolling sideways. Tests read body rows relative to the body's first row; the 41 snapshot goldens that moved were re-recorded by name after a programmatic check that each differs only by body rows shifting under the taller tags, and twelve scripts whose clicks targeted fixed rows now click the same text. 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 e4621311..b812b310 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -186,6 +186,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, + /// The tag shows all its rows (acme's `tagexpand`, on by default); off, + /// one row, as acme's Tagup leaves it. Down on the + /// tag's last line and Up on its first, typing, or Alt-Down and Alt-Up + /// in the tag, as acme's arrows in a tag (plan9port text.c:776). + tag_expanded: bool = true, /// 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 -- cgit v1.3