From 0d04bc9214cccce42d74862b31376d49bdda3956 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 09:05:35 -0300 Subject: Let s, S and | pressed in a tag answer for the tag's own text A tag is a text like the body, so selecting on a regex and piping act on the text they are pressed in: a prompt records the text it answers for, the tag keeps the keyboard while it is typed, and a header's prompt goes on the active pane's band. `/` still searches the body from anywhere, as acme's Look from a tag searches the body. 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 1e5be107..a67aa8ac 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -101,6 +101,10 @@ pub const Pane = struct { image: ?Image.State = null, pdf: PdfSlot = if (Pdf.enabled) null else {}, prompt: Prompt = .none, + /// The text an open prompt answers for: `s`/`S` select in it and `|` + /// pipes it. A header's is whichever has the keyboard; `/` and Save's + /// path always answer for the body. + prompt_for: Text.What = .body, /// The answer to an open prompt: its marker and what is typed after it, /// edited in insert mode and shown on the notice band, or a name draft /// shown on the tagline in place of the path. It is its own text so a @@ -314,6 +318,7 @@ pub const Pane = struct { pub fn closePrompt(pane: *Pane) void { pane.input.deinit(pane.gpa); pane.prompt = .none; + pane.prompt_for = .body; pane.nsel_snap = 0; } -- cgit v1.3