Use proper, limited excerpt ranges and manage inlay cache properly
This commit is contained in:
parent
2b989a9f12
commit
76d35b7122
4 changed files with 159 additions and 55 deletions
|
@ -249,6 +249,10 @@ impl DisplayMap {
|
|||
to_insert: Vec<(InlayId, InlayProperties<T>)>,
|
||||
cx: &mut ModelContext<Self>,
|
||||
) {
|
||||
if to_remove.is_empty() && to_insert.is_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
let buffer_snapshot = self.buffer.read(cx).snapshot(cx);
|
||||
let edits = self.buffer_subscription.consume().into_inner();
|
||||
let (snapshot, edits) = self.inlay_map.sync(buffer_snapshot, edits);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue