diff --git a/crates/debugger_ui/src/session/running/console.rs b/crates/debugger_ui/src/session/running/console.rs index de9d448bf56b2745ceeedec9fd8948de664d6cd7..147dd9baf40e84c4801810ef109dcd8d15a26da8 100644 --- a/crates/debugger_ui/src/session/running/console.rs +++ b/crates/debugger_ui/src/session/running/console.rs @@ -251,7 +251,7 @@ impl Console { let range = buffer.anchor_after(MultiBufferOffset(range.start)) ..buffer.anchor_before(MultiBufferOffset(range.end)); let color_fn = color_fetcher(color); - console.highlight_background_key( + console.highlight_background( HighlightKey::ConsoleAnsiHighlight(start_offset), &[range], move |_, theme| color_fn(theme), diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index f92b1023691b0998284f2075a72cde34cda9977a..36647fca631f4349a3bfc3c45c1f406e2c5c2c82 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -23483,19 +23483,6 @@ impl Editor { cx.notify(); } - pub fn highlight_background_key( - &mut self, - key: HighlightKey, - ranges: &[Range], - color_fetcher: impl Fn(&usize, &Theme) -> Hsla + Send + Sync + 'static, - cx: &mut Context, - ) { - self.background_highlights - .insert(key, (Arc::new(color_fetcher), Arc::from(ranges))); - self.scrollbar_marker_state.dirty = true; - cx.notify(); - } - pub fn clear_background_highlights( &mut self, key: HighlightKey, diff --git a/crates/language_tools/src/highlights_tree_view.rs b/crates/language_tools/src/highlights_tree_view.rs index 5fb0ddf897334176d413785a6e82ec2010bde8f7..fe09a3f3849539f5bf71826c907d5f064181ce10 100644 --- a/crates/language_tools/src/highlights_tree_view.rs +++ b/crates/language_tools/src/highlights_tree_view.rs @@ -556,7 +556,7 @@ impl HighlightsTreeView { ranges: &[Range], cx: &mut Context, ) { - editor.highlight_background_key( + editor.highlight_background( HighlightKey::HighlightsTreeView(key), ranges, |_, theme| theme.colors().editor_document_highlight_write_background, diff --git a/crates/language_tools/src/syntax_tree_view.rs b/crates/language_tools/src/syntax_tree_view.rs index 161a2e864992f77876c6f54be41fbbaf55ca06d5..b44d2e05d90733469a5385c2695b3fda3ff47c5e 100644 --- a/crates/language_tools/src/syntax_tree_view.rs +++ b/crates/language_tools/src/syntax_tree_view.rs @@ -484,7 +484,7 @@ impl SyntaxTreeView { ranges: &[Range], cx: &mut Context, ) { - editor.highlight_background_key( + editor.highlight_background( HighlightKey::SyntaxTreeView(key), ranges, |_, theme| theme.colors().editor_document_highlight_write_background,