summaryrefslogtreecommitdiff
path: root/src/look.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 09:05:35 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit0d04bc9214cccce42d74862b31376d49bdda3956 (patch)
treeb45286fe0847b08c76e6abd562f6e2f985322e17 /src/look.zig
parent66c0106691e4de925011f314200e85ee265b7861 (diff)
downloadpardes-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/look.zig')
-rw-r--r--src/look.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/look.zig b/src/look.zig
index cbdf0bea..d7e763d3 100644
--- a/src/look.zig
+++ b/src/look.zig
@@ -502,7 +502,7 @@ const SearchStart = enum { top, cursor };
pub fn submitSearch(p: *Pardes, id: usize) void {
const pane = p.panes[id] orelse return;
- if (normal.selRegexArmed(pane)) |a| return normal.applySelRegex(p, pane, a.pat, a.split);
+ if (normal.selRegexArmed(pane)) |a| return if (p.promptTarget(pane)) |t| normal.applySelRegex(p, pane, t, a.pat, a.split);
const armed = pane.promptText() orelse return;
const slash = std.mem.indexOfScalar(u8, armed, '/') orelse return;
if (std.mem.startsWith(u8, armed, config.rename_marker)) return p.lspRequest(id, .rename, armed[slash + 1 ..]);