summaryrefslogtreecommitdiff
path: root/docs/design.typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 09:16:36 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commita9de2b51ab76a43250a4d6c41a0ddd54e6970049 (patch)
treea2138ead27f434026c224fd8b926f66b7fd7fe0c /docs/design.typ
parent0d04bc9214cccce42d74862b31376d49bdda3956 (diff)
downloadpardes-a9de2b51ab76a43250a4d6c41a0ddd54e6970049.tar.gz
pardes-a9de2b51ab76a43250a4d6c41a0ddd54e6970049.zip
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 <[email protected]>
Diffstat (limited to 'docs/design.typ')
-rw-r--r--docs/design.typ15
1 files changed, 9 insertions, 6 deletions
diff --git a/docs/design.typ b/docs/design.typ
index 8e5f7e6e..234c3692 100644
--- a/docs/design.typ
+++ b/docs/design.typ
@@ -790,12 +790,15 @@ A tag holds any number of lines; a pane's tag takes a row per line up to
A pane's tag shows a live prefix (path, dirty marker, PDF page) before the text
it owns, and that prefix is computed at every read, never stored
-(`tagline.tagPrefix`). The Text's coordinates are offsets into its own text
-alone, so a rename or a save never moves its cursor. The one translation
-point is the whole line as shown: render, the mouse, Look, Exec and the 9P
-`tag` file see prefix ++ text, while keyboard motions and edits see only the
-text. Editing the path is a separate draft (`Pane.prompt = .name`) committed
-by Enter, since a buffer's name is not text it owns.
+(`tagline.tagPrefix`). Everything sees the whole line as shown, prefix ++
+text: render, the mouse, Look, Exec, the 9P `tag` file and the keyboard,
+whose motions reach the path as acme's do. The prefix is read-only: an edit
+installs only what follows it, and one that would change it is refused
+(`edit.setEditText`, `Text.refused`). Because the prefix is computed, sync
+moves the tag's positions with it when its length changes (`Pane.tag_lead`).
+Editing the path is a separate draft (`Pane.prompt = .name`) committed by
+Enter, since a buffer's name is not text it owns; a click or a key typed
+into it starts one.
The tag's text is bounded by `limits.max_tag_tail`: the 9P `tag` file and a
dump reader refuse input that does not fit rather than truncating it.