Fix document colors issues with other inlays and multi buffers (#33598)

Closes https://github.com/zed-industries/zed/issues/33575

* Fixes inlay colors spoiled after document color displayed
* Optimizes the query pattern for large multi buffers

Release Notes:

- Fixed document colors issues with other inlays and multi buffers
This commit is contained in:
Kirill Bulatov
2025-06-28 21:10:49 +00:00
committed by GitHub
parent 521a223681
commit 41583fb066
8 changed files with 288 additions and 250 deletions
+2 -2
View File
@@ -327,9 +327,9 @@ impl<'a> Iterator for InlayChunks<'a> {
InlayId::DebuggerValue(_) => self.highlight_styles.inlay_hint,
InlayId::Color(_) => match inlay.color {
Some(color) => {
let style = self.highlight_styles.inlay_hint.get_or_insert_default();
let mut style = self.highlight_styles.inlay_hint.unwrap_or_default();
style.color = Some(color);
Some(*style)
Some(style)
}
None => self.highlight_styles.inlay_hint,
},