diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 16:24:59 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 7ce5d94b5d48b68c86d015060ebcabe63e299e1a (patch) | |
| tree | ddfbe4e1ac160cbd780c28751b5421ceca648d39 /src/exec.zig | |
| parent | 3992e9def8692710590deacbc20bd925e0f8d64a (diff) | |
| download | pardes-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/exec.zig')
| -rw-r--r-- | src/exec.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/exec.zig b/src/exec.zig index 1b82d2a8..455a325e 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -752,7 +752,7 @@ test "the acme chords act once per selection, not once on the primary" { .{ .anchor = 7, .head = 13 }, }; pane.body.setRanges(pane.file.?.content, &ranges, &.{}, 0, true); - try std.testing.expectEqual(@as(u8, 1), pane.body.nsel); + try std.testing.expectEqual(@as(u16, 1), pane.body.nsel); const before = p.ncol; p.update(.{ .key = .{ .cp = Key.tab } }); // config.exec_key: Exec @@ -760,7 +760,7 @@ test "the acme chords act once per selection, not once on the primary" { // other cursor, so one keystroke over two cursors made one column. try std.testing.expectEqual(before + 2, p.ncol); // ...and the chord consumed the selection exactly as it does with one. - try std.testing.expectEqual(@as(u8, 0), p.panes[0].?.body.nsel); + try std.testing.expectEqual(@as(u16, 0), p.panes[0].?.body.nsel); } test "a switch clicked with a selection held flips unless the selection says on or off" { |
