Start work on new text input handling in Editor
This commit is contained in:
parent
0b81a4dfae
commit
f985515141
6 changed files with 129 additions and 43 deletions
|
@ -195,6 +195,11 @@ impl DisplayMap {
|
|||
.insert(Some(type_id), Arc::new((style, ranges)));
|
||||
}
|
||||
|
||||
pub fn text_highlights(&self, type_id: TypeId) -> Option<(HighlightStyle, &[Range<Anchor>])> {
|
||||
let highlights = self.text_highlights.get(&Some(type_id))?;
|
||||
Some((highlights.0, &highlights.1))
|
||||
}
|
||||
|
||||
pub fn clear_text_highlights(
|
||||
&mut self,
|
||||
type_id: TypeId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue