Add interactable fold markers
Change fold handlers to be driven by the fold map Switch to a mouse region based implementation for click regions Co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
7ca0b38048
commit
606d683f29
8 changed files with 140 additions and 42 deletions
|
@ -8,6 +8,7 @@ use block_map::{BlockMap, BlockPoint};
|
|||
use collections::{HashMap, HashSet};
|
||||
use fold_map::FoldMap;
|
||||
use gpui::{
|
||||
color::Color,
|
||||
fonts::{FontId, HighlightStyle},
|
||||
Entity, ModelContext, ModelHandle,
|
||||
};
|
||||
|
@ -218,6 +219,10 @@ impl DisplayMap {
|
|||
.update(cx, |map, cx| map.set_font(font_id, font_size, cx))
|
||||
}
|
||||
|
||||
pub fn set_fold_ellipses_color(&mut self, color: Color) -> bool {
|
||||
self.fold_map.set_ellipses_color(color)
|
||||
}
|
||||
|
||||
pub fn set_wrap_width(&self, width: Option<f32>, cx: &mut ModelContext<Self>) -> bool {
|
||||
self.wrap_map
|
||||
.update(cx, |map, cx| map.set_wrap_width(width, cx))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue