summaryrefslogtreecommitdiff
path: root/src/Terminal.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 16:24:59 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit7ce5d94b5d48b68c86d015060ebcabe63e299e1a (patch)
treeddfbe4e1ac160cbd780c28751b5421ceca648d39 /src/Terminal.zig
parent3992e9def8692710590deacbc20bd925e0f8d64a (diff)
downloadpardes-7ce5d94b5d48b68c86d015060ebcabe63e299e1a.tar.gz
pardes-7ce5d94b5d48b68c86d015060ebcabe63e299e1a.zip
A selection holds up to 1024 ranges on the desktop, 64 on the board
The limit was 64 everywhere, which helix-golf's enumerate_and_align outgrows (%s |\d+ makes 121 ranges). It is now memory.limits.selections, per platform, and the counts that hold it are u16. The ranges stay inline in each Text, so a pane grows by about 80 KiB on the desktop (three texts and the regex prompt's snapshot); the Pane size budget in Terminal.zig moves from 128 to 160 KiB and says why. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/Terminal.zig')
-rw-r--r--src/Terminal.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Terminal.zig b/src/Terminal.zig
index 4f94533d..1ff561b1 100644
--- a/src/Terminal.zig
+++ b/src/Terminal.zig
@@ -545,7 +545,10 @@ test "replay ownership is terminal-only and construction rolls back on allocatio
try std.testing.expectEqual(terminal and enabled, pane.terminal != null);
}
};
- try std.testing.expect(@sizeOf(Pane) < 128 * 1024);
+ // Most of it is the three texts' selections, limits.selections ranges
+ // each held inline (about 20 KiB a text on the desktop), and the regex
+ // prompt's snapshot of them.
+ try std.testing.expect(@sizeOf(Pane) < 160 * 1024);
try std.testing.checkAllAllocationFailures(std.testing.allocator, Case.run, .{false});
try std.testing.checkAllAllocationFailures(std.testing.allocator, Case.run, .{true});
}