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-29 00:10:49 +03:00 committed by GitHub
parent 521a223681
commit 41583fb066
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 288 additions and 250 deletions

View file

@ -487,8 +487,9 @@ impl Editor {
if opened_first_time {
cx.spawn_in(window, async move |editor, cx| {
editor
.update(cx, |editor, cx| {
editor.refresh_inlay_hints(InlayHintRefreshReason::NewLinesShown, cx)
.update_in(cx, |editor, window, cx| {
editor.refresh_inlay_hints(InlayHintRefreshReason::NewLinesShown, cx);
editor.refresh_colors(false, None, window, cx);
})
.ok()
})
@ -599,6 +600,7 @@ impl Editor {
);
self.refresh_inlay_hints(InlayHintRefreshReason::NewLinesShown, cx);
self.refresh_colors(false, None, window, cx);
}
pub fn scroll_position(&self, cx: &mut Context<Self>) -> gpui::Point<f32> {