Repository navigation
Commit b74d954
input: collection-owned tracked range decorations
Range decorations become an independently owned collection instead of a
global annotation list, and gutter markers and inline widgets are split out
of this change.
- Add `RangeDecorationCollection` with `set` / `append` / `clear` / `dispose`
/ `get_ranges`. Each collection owns only its own entries, so separate
extensions cannot overwrite one another, and dropping a handle does not
clear it. Public decoration IDs are gone; the handle owns lifetime.
- Share UTF-8 normalization and edit tracking between text and geometric
decorations through a `TrackedDecoration` abstraction.
- Clip and project ranges through the shaped lines, so soft wraps,
continuation indents, CRLF and folds no longer make a partly visible range
disappear.
- Add an interval index queried once per visible, non-folded buffer span;
edits update affected entries linearly without re-sorting.
- Remove gutter markers, gutter lane reservation, inline widgets, the
`InputEvent::GutterMarkerMouseDown` variant and the `Editor` gutter
renderer projection, plus their story/shell exhaustive-match arms.
- Update the English and Chinese docs and the Editor story.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 32030ed commit b74d954
11 files changed
Lines changed: 1099 additions & 183 deletions
File tree
- crates
- base/src/input
- base
- editor
- component/src/input
- story/src/stories
- website
- base/primitives
- component
- zh-CN
- base/primitives
- component
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| |||
336 | 342 | | |
337 | 343 | | |
338 | 344 | | |
| 345 | + | |
339 | 346 | | |
340 | 347 | | |
341 | 348 | | |
| |||
348 | 355 | | |
349 | 356 | | |
350 | 357 | | |
| 358 | + | |
351 | 359 | | |
352 | 360 | | |
353 | 361 | | |
| |||
0 commit comments