summaryrefslogtreecommitdiff
path: root/docs/selections.md
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 /docs/selections.md
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 'docs/selections.md')
-rw-r--r--docs/selections.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/selections.md b/docs/selections.md
index 202ec3d9..59c4415b 100644
--- a/docs/selections.md
+++ b/docs/selections.md
@@ -10,7 +10,8 @@ at `694e7dfdd`, upstream `278b24389`.
Every `Text` (src/Text.zig) has its own: a pane's body, its tag, a prompt's
answer, a column's or the workspace's tag. A selection is one primary range
-plus up to 63 others.
+plus others, up to `memory.limits.selections` in all (1024 on the
+desktop, 64 on the board).
- The PRIMARY is where the cursor always was: `cur_row`/`cur_col` is the
head, `vsel.row`/`vsel.col` the anchor while `vsel.active`, and a bare
@@ -33,7 +34,7 @@ plus up to 63 others.
`Text.setRanges` is the one writer of a whole selection: it sorts by start,
merges ranges that overlap or share a start (helix `normalize`), follows the
-primary through the merges, and keeps the first 64. `setRange` writes one
+primary through the merges, and keeps the first `max_selections`. `setRange` writes one
range and drops the others.
## Making, splitting, merging, rotating, removing
@@ -107,7 +108,8 @@ the replay.
- Direction of a one-character range: both of its cells are the same cell,
so it has none. helix can flip one (`Alt-;`) and the commands that read
the head (`&`, the next extend) see the difference.
-- Count: at most 64 ranges; matches past that are dropped silently.
+- Count: at most `memory.limits.selections` ranges (1024 on the desktop, 64
+ on the board); matches past that are dropped silently.
- `n`/`N` walk the look ring (acme), not regex search hits, and there is no
`*`; helix-golf's `*`, `""N` and `n` do not apply.
- `s`/`S` match as sam does (docs/helix-keys.md, "Regex selection"): each