From fb72c2402fa1b1ae99be64fe7b2947ea5dd42623 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 01:05:11 -0300 Subject: Let a tag's computed prefix bring its own separating space The space between a pane's path and its commands belongs to the tag's own text, so deleting it, or truncating the 9P tag and writing `Get`, ran the path and the word together for Look and Exec. The prefix now adds a space whenever the text does not start with one; every default text does, so the default tags read and render as before. Co-Authored-By: Claude Opus 5.5 --- src/body_layer.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/body_layer.zig') diff --git a/src/body_layer.zig b/src/body_layer.zig index 04c84b62..ab8a888a 100644 --- a/src/body_layer.zig +++ b/src/body_layer.zig @@ -685,7 +685,7 @@ fn tagTintRange(pane: *const Pane, tag: []const u8, prefix_len: usize) ?struct { if (pane.prompt == .name) pane.input.own orelse file.path else file.path else if (pane.image) |state| blk: { // Image tags put renderer controls before the path. - start = prefix_len -| state.path.len; + start = std.mem.lastIndexOf(u8, tag[0..prefix_len], state.path) orelse return null; break :blk state.path; } else if (comptime pdf_enabled) blk: { break :blk if (pane.pdf) |state| state.path else return null; -- cgit v1.3