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/look.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/look.zig') 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 ..]); -- cgit v1.3