fix: retain semantic colors across editable diff updates
This commit is contained in:
+5
-2
@@ -238,8 +238,11 @@ impl Lsp {
|
||||
if !Arc::ptr_eq(&cached.snapshot, &snapshot) {
|
||||
cached.snapshot = Arc::clone(&snapshot);
|
||||
cached.diagnostics.clear();
|
||||
cached.semantic_tokens = None;
|
||||
self.changed_semantics.insert(snapshot.id);
|
||||
if cached.semantic_tokens.take().is_some() {
|
||||
// Discard queued old coordinates, not explicit clears such as retirement.
|
||||
// The editor keeps remapped colors until a server reply replaces them.
|
||||
self.changed_semantics.remove(&snapshot.id);
|
||||
}
|
||||
self.changed_diagnostics.insert(snapshot.id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user