ZIm/crates/editor2/src
Antonio Scandurra 510320bb47
Introduce InteractiveText (#3397)
This new element will let us react to click events on arbitrary ranges
of some rendered text, e.g.:

```rs
InteractiveText::new(
    "element-id",
    StyledText::new("Hello world, how is it going?").with_runs(vec![
        cx.text_style().to_run(6),
        TextRun {
            background_color: Some(green()),
            ..cx.text_style().to_run(5)
        },
        cx.text_style().to_run(18),
    ]),
)
.on_click(vec![2..4, 1..3, 7..9], |range_ix, cx| {
    println!("Clicked range {range_ix}");
})
```

As part of this, I also added the ability to give text runs a background
color.

Release Notes:

- N/A
2023-11-23 19:35:03 +01:00
..
display_map WIP 2023-11-20 14:46:01 -08:00
scroll Make inlay hint cache tests pass 2023-11-13 18:25:21 +02:00
test Get diagnostics view almost building in the zed2 world 2023-11-17 16:32:35 -05:00
blink_manager.rs Fix blinking behavior in editor when receiving/losing focus 2023-11-08 19:03:57 +01:00
display_map.rs Separate WrappedLines from ShapedLines 2023-11-16 23:10:51 -07:00
editor.rs Introduce InteractiveText (#3397) 2023-11-23 19:35:03 +01:00
editor_settings.rs Fix editor settings deserialization in editor2 2023-11-09 15:37:46 -08:00
editor_tests.rs Merge branch 'main' into derive-element-redux 2023-11-20 09:15:38 -07:00
element.rs Allow setting text background color via TextStyle 2023-11-23 19:22:18 +01:00
git.rs Return a Fold struct when querying the FoldMap 2023-11-15 17:09:59 +01:00
highlight_matching_bracket.rs Merge remote-tracking branch 'origin/main' into editor-movement 2023-11-07 18:48:08 +01:00
hover_popover.rs WIP 2023-11-20 14:46:01 -08:00
inlay_hint_cache.rs Exclude more ignored/worktree-less/project-less buffers from inlay hint requests 2023-11-23 10:30:52 +02:00
items.rs TextColor -> Color 2023-11-21 01:05:29 -05:00
link_go_to_definition.rs uncomment mouse moved 2023-11-08 14:24:28 +01:00
mouse_context_menu.rs Remove dependency from gpui from editor2 2023-11-03 09:05:58 +01:00
movement.rs Separate WrappedLines from ShapedLines 2023-11-16 23:10:51 -07:00
persistence.rs Get editor2 compiling with a ton of code commented out 2023-11-02 23:35:20 -06:00
scroll.rs Merge branch 'main' into unborked-git-zed2-diagnostics-view 2023-11-17 16:32:35 -05:00
selections_collection.rs Separate WrappedLines from ShapedLines 2023-11-16 23:10:51 -07:00
test.rs checkpoint 2023-11-08 23:16:04 -08:00