Store accessors for editor highlight colors not colors themselves

This commit is contained in:
Keith Simmons
2022-04-13 15:30:57 -07:00
parent 031472dc5a
commit 292d075f81
4 changed files with 36 additions and 29 deletions
+3
View File
@@ -22,6 +22,7 @@ use gpui::{
};
use json::json;
use language::{Bias, DiagnosticSeverity};
use settings::Settings;
use smallvec::SmallVec;
use std::{
cmp::{self, Ordering},
@@ -917,9 +918,11 @@ impl Element for EditorElement {
let display_map = view.display_map.update(cx, |map, cx| map.snapshot(cx));
highlighted_rows = view.highlighted_rows();
let theme = cx.global::<Settings>().theme.as_ref();
highlighted_ranges = view.background_highlights_in_range(
start_anchor.clone()..end_anchor.clone(),
&display_map,
theme,
);
let mut remote_selections = HashMap::default();