This commit is contained in:
Nathan Sobo 2023-04-12 10:07:17 -06:00
parent 83070a19c4
commit 868301bedb
26 changed files with 194 additions and 175 deletions

View file

@ -3,7 +3,7 @@ use std::path::Path;
use fuzzy::StringMatch;
use gpui::{
elements::{Label, LabelStyle},
Element, ElementBox,
Element, ElementBox, View,
};
use workspace::WorkspaceLocation;
@ -42,7 +42,7 @@ impl HighlightedText {
}
}
pub fn render(self, style: impl Into<LabelStyle>) -> ElementBox {
pub fn render<V: View>(self, style: impl Into<LabelStyle>) -> ElementBox<V> {
Label::new(self.text, style)
.with_highlights(self.highlight_positions)
.boxed()