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/pardes.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/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 87041f39..a7bcb195 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -3123,7 +3123,7 @@ test "s in a header selects in the header's own text" { const text = try edit.flatSurface(p, &p.global_tag); const got = p.global_tag.ranges(text, 0, &ranges); try std.testing.expectEqual(@as(usize, 3), got.n); // Newcol, Joincol, NextColor - try std.testing.expectEqual(@as(u8, 0), pane.body.nsel); + try std.testing.expectEqual(@as(u16, 0), pane.body.nsel); } test "Enter in a header runs the word under its cursor, as the execute key does" { @@ -7547,7 +7547,7 @@ test "jump history clears selections and lands at the recorded cursor" { try std.testing.expectEqual(@as(usize, 2), p.njumps); try std.testing.expectEqual(@as(u32, 3), p.jumps[0].line); try std.testing.expect(!pane.body.vsel.active and !pane.body.msel.active and !pane.body.select); - try std.testing.expectEqual(@as(u8, 0), pane.body.nsel); + try std.testing.expectEqual(@as(u16, 0), pane.body.nsel); try std.testing.expectEqual(.none, pane.sel[0].state); try std.testing.expect(pane.pointer_selections[0] == null); try std.testing.expectEqual(@as(i32, if (index == 0) 2 else 0), pane.body.cur_row); |
