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

@ -956,7 +956,7 @@ fn fetch_and_update_hints(
.update(cx, |editor, cx| {
if got_throttled {
let query_not_around_visible_range = match editor
.excerpts_for_inlay_hints_query(None, cx)
.visible_excerpts(None, cx)
.remove(&query.excerpt_id)
{
Some((_, _, current_visible_range)) => {
@ -2525,9 +2525,7 @@ pub mod tests {
cx: &mut gpui::TestAppContext,
) -> Range<Point> {
let ranges = editor
.update(cx, |editor, _window, cx| {
editor.excerpts_for_inlay_hints_query(None, cx)
})
.update(cx, |editor, _window, cx| editor.visible_excerpts(None, cx))
.unwrap();
assert_eq!(
ranges.len(),