Open
Conversation
- Add Selection.anchor_caret type (Anchor_outer | Anchor_inner(int)) to track partial-token boundaries at the anchor end of selections - Implement Select.local_by_char for character-level grow/shrink - Split Perform.re dispatch: ByChar → local_by_char, ByToken → local - Update existing tests that used ByChar for piece-level selection to use ByToken instead Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Caret.point: compute from piece origin for Inner carets with selection content, avoiding generalized_neighbor which unselects - selection_anchor_point: compute from token origin using anchor_caret offset (Inner(n) always indexes left-to-right) - shrink_by_char crossover: use directional_unselect towards anchor end so caret lands at anchor position, not focus position - Add 12 passing char selection tests (intra-token, from-inner, shrink) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… bindings (Phases 2b-5) - Fix crossover in shrink_by_char to put content in right siblings for Inner(an) - Fix grow_by_char Outer case to use Zipper.select (handles ancestor boundaries) - Update toggle_focus to swap caret ↔ anchor_caret - Update directional_unselect to restore anchor_caret and handle Inner references - Shift+Arrow now selects by char; Alt+Shift+Arrow (Mac) / Ctrl+Shift (PC) by token - 30 char selection tests all passing, no regressions (445 editing tests pass) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add normalize_char_selection to Zipper.re that splits partial boundary tokens into exterior (kept) and interior (discarded) portions. Single-piece selections combine remainders into one token with Inner caret at the seam, so callers like Insert.go can insert within the combined token. Multi-piece selections place remainders as separate pieces in siblings. Wire normalization into Destruct.destruct and Insert.go before destroy_selection. Internal callers (replace_shard, etc.) skip normalization to avoid re-entrancy with incidental Inner carets. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add clip_char_selection to Highlight.re: clips first/last row boundaries for char-level selections based on anchor_caret and caret Inner offsets - Inline selection highlight pipeline to insert clipping between row computation and SVG generation - Update Select.vertical and Select.to_point to use local_by_char instead of local, giving character-level precision for Shift+Up/Down and mouse drag selections Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 13 new tests (52 total) covering: - String literal selections and delete within strings - Multi-delimiter tile partial selections (let, in keywords) - Nested structures (nested let, number literals) - Delete and insert within number literals - Grow/shrink round-trips within a single token Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy: selected_text_segment trims boundary tokens to only the selected portion, so copying a partial token (e.g., "ru" from "true") gives the correct substring instead of the entire token. Delimiter jump: decompose_multi_shard_neighbor splits multi-shard tiles (if-then-else, let-in) into individual shards before growing selection, and push_raw/grow_selection_raw skip reassembly to prevent matching shards from merging back together inside selection content. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The copy path now prints the full selection content, then substrings it using character offsets from the boundary carets. This replaces the old approach that split boundary tokens independently, which gave wrong results when both boundaries were on the same token (e.g., selecting "ppl" from "apple" gave "pple"). Adds 7 test_copy tests covering intra-token, prefix, suffix, whole token, single char, and cross-token copy. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…k caret jump replace_shard_inplace bypasses adj_pos→move(Left) which flattened ancestors when left siblings were empty during Inner-caret token edits. shrink_by_char now resets caret to Outer after popping a piece from selection, preventing stale Inner(n) from being interpreted against the wrong token. Remove debug logging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix paste-into-token crash in let expressions: create put_down_no_reassemble to avoid ancestor tile absorption during Inner-caret edits (Relatives.reassemble was merging replaced tokens back into multi-shard parent tiles like let...=...in) - Fix comment insertion creating invalid expressions: add direct Secondary piece swap path in replace_shard_inplace, bypassing the delete/insert cycle that introduced spurious grout - Add vertical selection chunkiness (Shift+Option for ByToken) - Update test expectations for standalone comment grout Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 2-6 of char-level selection: anchor_caret field, local_by_char selection growth/shrink, crossover handling, toggle focus, unselect, keyboard bindings (Shift+Arrow = ByChar, Alt+Shift = ByToken), destruct/insert over char selections, copy with trim offsets. Fix cut-paste across delimiter boundaries: rescan_parent_shards walks ancestor chain to reconnect fresh-ID delimiters with their parent tile. Uses in-place absorption (try_absorb) instead of delete_parent to preserve intermediate ancestors like parens. Add no-progress guard in do_towards_point to prevent infinite loops during selection operations. Cross-boundary paste tests, char-selection tests, string/comment delimiter preservation tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Brings in Alt+N keyboard shortcut, sort-dependent variable highlight colors, and cross-boundary paste fix (from deep-reassociate-clean merge). Conflict resolution: kept char-selections Keyboard.re (ByChar for Shift+Arrow, ByToken for Alt+Shift+Arrow) with probes-III code field and is_new_slide. Kept char-selections Zipper.re and Test_Editing.re (superset of probes-III versions). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
disconcision
commented
Mar 30, 2026
| ~refractors=z.refractors.manuals, | ||
| z.selection.content, | ||
| ); | ||
| Zipper.trim_selected_text(z, full); |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## probes-III #2199 +/- ##
==============================================
+ Coverage 51.39% 51.67% +0.27%
==============================================
Files 254 255 +1
Lines 30520 30858 +338
==============================================
+ Hits 15687 15945 +258
- Misses 14833 14913 +80
🚀 New features to boost your workflow:
|
Contributor
Performance Benchmarks⏳ Running... View workflow |
mk_remainder_piece now checks Token.is_secondary and creates Secondary pieces for comment/whitespace tokens. Previously all remainders were Tiles, causing edited comments to become invalid expressions. Updated test expectations: comment remainders no longer fill expression slots (grout ? appears correctly). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Member
|
modifier key not working to do token-based selection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Todo