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/Pipe.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/Pipe.zig')
| -rw-r--r-- | src/Pipe.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Pipe.zig b/src/Pipe.zig index 37145edf..48e98b7b 100644 --- a/src/Pipe.zig +++ b/src/Pipe.zig @@ -55,10 +55,10 @@ pub const PendingPipe = struct { cwd: []u8, inputs: []selection_pipe.Input, ranges: [panes.Text.max_selections]modal.Selection, - primary: u8, + primary: u16, explicit: bool, how: modal.Normal.PipeBehavior, - nranges: u8, + nranges: u16, pub fn deinit(wait: *PendingPipe, gpa: std.mem.Allocator) void { gpa.free(wait.command); @@ -453,7 +453,7 @@ test "selection pipe replaces all ranges atomically and undo restores them" { p.update(.{ .pipe_resp = .{ .id = id, .success = true, .outputs = outputs } }); try std.testing.expectEqualSlices(u8, "AA bb \n", pane.file.?.content); try std.testing.expectEqual(@as(usize, 1), pane.file.?.history.undo_len); - try std.testing.expectEqual(@as(u8, 1), pane.body.nsel); + try std.testing.expectEqual(@as(u16, 1), pane.body.nsel); try std.testing.expectEqual(@as(i32, 1), pane.body.cur_col); try std.testing.expectEqual(@as(i32, 6), pane.body.sels[0].col); try std.testing.expect(!denied.has_induced_failure); |
