diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 01:05:11 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | fb72c2402fa1b1ae99be64fe7b2947ea5dd42623 (patch) | |
| tree | 2ddaa866f23bf8ce44cc2d2dc315ede7e4b8a263 /src/body_layer.zig | |
| parent | 9d2e07e997de155c7dbb894a79e5c11839eab39e (diff) | |
| download | pardes-fb72c2402fa1b1ae99be64fe7b2947ea5dd42623.tar.gz pardes-fb72c2402fa1b1ae99be64fe7b2947ea5dd42623.zip | |
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 <[email protected]>
Diffstat (limited to 'src/body_layer.zig')
| -rw-r--r-- | src/body_layer.zig | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
