Skip to content

Commit

Permalink
fix: Add ancestor fields to field set
Browse files Browse the repository at this point in the history
  • Loading branch information
Desdaemon committed Aug 28, 2024
1 parent e2a0fcc commit 54f57bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ impl LanguageServer for Backend {
{
let mut document = self
.document_map
.get_mut(params.text_document.uri.path())
// .expect(format_loc!("deadlock"))
.try_get_mut(params.text_document.uri.path())
.expect(format_loc!("deadlock"))
.expect("Did not build a document");
old_rope = document.rope.clone();
// Update the rope
Expand Down
1 change: 1 addition & 0 deletions src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ impl ModelIndex {
if let Some(entry) = self.populate_field_names(ancestor, locations_filter) {
if let Some(fields) = entry.fields.as_ref() {
for (name, field) in fields {
fields_set.insert(interner().resolve(&name).as_bytes(), ());
match out.entry(*name) {
Entry::Occupied(mut old_field) => {
old_field.get_mut().merge(field);
Expand Down

0 comments on commit 54f57bb

Please sign in to comment.