summaryrefslogtreecommitdiff
path: root/docs
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
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')
-rw-r--r--docs/helix-keys.md2
-rw-r--r--docs/selections.md5
2 files changed, 5 insertions, 2 deletions
diff --git a/docs/helix-keys.md b/docs/helix-keys.md
index 88aca887..1fb1c67a 100644
--- a/docs/helix-keys.md
+++ b/docs/helix-keys.md
@@ -282,7 +282,7 @@ keeps the matches it found so far.
| an all-lowercase pattern | matches case-blind | helix's smart-case. mvzr has no such flag, so the surface is lowercased instead (ASCII folding is byte-for-byte, so the offsets are identical) | helix-verified |
| `^` and `$` | hold at every line's start and end | helix compiles with `multi_line(true)`; pardes gets the same by searching each line as its own haystack (`src/regexp.zig`) | helix-verified |
| `.` | never matches a newline | as the Rust regex crate: a pattern without `\n` searches line by line, and one that names `\n` has its `.`s made `[^\n]` (`src/regexp.zig`) | helix-verified |
-| many matches | up to `memory.limits.selections` ranges: 1024 on the desktop, 64 on the board; matches past it are dropped | helix has no limit. The ranges are held inline in every `Text` (about 20 KiB each on the desktop) | helix-verified up to the limit |
+| many matches | up to `memory.limits.selections` ranges: 1024 on the desktop, 64 on the board; matches past it are dropped | helix has no limit. The room for them is allocated when a second range appears and given back at one range, so a single cursor costs nothing | helix-verified up to the limit |
| `K<pat>` / `Alt-K<pat>` Enter | keep only the ranges a match starts inside / only those none does; primary 0, and keeping none leaves the selection alone | helix `keep_selections` / `remove_selections`, on the same prompt as `s`/`S` (markers `Keep /`, `Remove /`). The range is searched as `s` searches it, line by line with its lines' context, where helix matches the range's text alone: a `^` right at a range that starts mid-line matches in helix and not here | helix-verified |
### `Ctrl-c` — toggle comments
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