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:
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user