diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 09:05:35 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 0d04bc9214cccce42d74862b31376d49bdda3956 (patch) | |
| tree | b45286fe0847b08c76e6abd562f6e2f985322e17 /src/panes.zig | |
| parent | 66c0106691e4de925011f314200e85ee265b7861 (diff) | |
| download | pardes-0d04bc9214cccce42d74862b31376d49bdda3956.tar.gz pardes-0d04bc9214cccce42d74862b31376d49bdda3956.zip | |
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 <[email protected]>
Diffstat (limited to 'src/panes.zig')
| -rw-r--r-- | src/panes.zig | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |
