summaryrefslogtreecommitdiff
path: root/src/ninep/pane.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 09:13:55 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit36241daca2aaf90cc8933dffd95fc3cd6216e2b7 (patch)
treea24873db3188e64f699b828a764b813f29f02de6 /src/ninep/pane.zig
parenta550753fb60be3cdc040c521ddaab9022f5d3248 (diff)
downloadpardes-36241daca2aaf90cc8933dffd95fc3cd6216e2b7.tar.gz
pardes-36241daca2aaf90cc8933dffd95fc3cd6216e2b7.zip
/index shows names as the log does, one line of UTF-8, and a newline in a name as \n
/index printed a name as it was, so a directory with a newline in it split its row in two, and bytes not UTF-8 went through; the log turned the newline into a space, silently another name. Both now show a name one way: a newline `\n`, other controls, DEL and C1 a space, bytes not UTF-8 `\xNN`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/pane.zig')
-rw-r--r--src/ninep/pane.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig
index 4c967fc5..d29c8b49 100644
--- a/src/ninep/pane.zig
+++ b/src/ninep/pane.zig
@@ -298,7 +298,8 @@ pub fn indexLen(p: *Pardes) u64 {
const pane = p.panes[p.paneBySerial(serial).?].?;
var digits: [16]u8 = undefined;
n += (std.fmt.bufPrint(&digits, "{d}", .{serial}) catch unreachable).len;
- n += 1 + kindOf(pane).len + 3 + nameOf(pane).len + 1;
+ var name_buf: [4 * 4096]u8 = undefined;
+ n += 1 + kindOf(pane).len + 3 + events.shown(nameOf(pane), &name_buf).len + 1;
n += 1 + (std.fmt.bufPrint(&digits, "{d}", .{columnOf(p, p.paneBySerial(serial).?)}) catch unreachable).len;
}
return n;