Skip to content

Commit

Permalink
editor: Ensure proposed changes editor is syntax-highlighted when ope…
Browse files Browse the repository at this point in the history
…ned (#18648)

This PR fixes an issue where the proposed changes editor would not have
any syntax highlighting until a modification was made.

When creating the branch buffer we reparse the buffer to rebuild the
syntax map.

Release Notes:

- N/A
  • Loading branch information
maxdeviant authored Oct 2, 2024
1 parent 0e82765 commit 7c46155
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/language/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,9 @@ impl Buffer {
branch.set_language_registry(language_registry);
}

// Reparse the branch buffer so that we get syntax highlighting immediately.
branch.reparse(cx);

branch
})
}
Expand Down

0 comments on commit 7c46155

Please sign in to comment.