summaryrefslogtreecommitdiff
path: root/docs/selections.md
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 16:57:01 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit68e30f560e46bb9a30433eb23b4edb1b93d69f46 (patch)
tree3f5f3085051488635ec61c02e33062e1eb94bdd7 /docs/selections.md
parentcd563b1768c688444cc6d172b3679d95b495207c (diff)
downloadpardes-68e30f560e46bb9a30433eb23b4edb1b93d69f46.tar.gz
pardes-68e30f560e46bb9a30433eb23b4edb1b93d69f46.zip
A selection's other ranges live out of line, made at the second range and freed at one
The ranges beside the primary were an inline array in every Text, which at 1024 grew each pane by about 60 KiB. They are now allocated when a second range appears (Text.reserveSels) and given back when the selection is one range again (Text.dropSels); a column's or the workspace's tag allocates from Text.gpa, any other text from its pane's. A refused tag edit restores them by copy. The Pane size budget is back to 128 KiB, and a test holds that a single cursor allocates nothing for them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/selections.md')
-rw-r--r--docs/selections.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/selections.md b/docs/selections.md
index 203cf1de..5cc1df1a 100644
--- a/docs/selections.md
+++ b/docs/selections.md
@@ -17,7 +17,10 @@ desktop, 64 on the board).
head, `vsel.row`/`vsel.col` the anchor while `vsel.active`, and a bare
cursor (inactive `vsel`) is the one-character range under it. `msel` is
the older whole-line form (`r0`..`r1`), kept for search-result highlights.
-- The others are `sels[0..nsel]`, each a `SelRange` of head and anchor plus
+- The others are `sels[0..nsel]`, in room allocated when a second range
+ appears and given back when the selection is one range again (a column's
+ or the workspace's tag allocates from `Text.gpa`, any other text from its
+ pane's), each a `SelRange` of head and anchor plus
its own `j`/`k` goal column, in document order. The primary is not in the
list; `Text.ranges` slots it in and returns its index.
- Ends are CELLS, the characters a block cursor sits on, where helix's are