editor: Ensure proposed changes editor is syntax-highlighted when opened (#18648)

Marshall Bowers created

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

Change summary

crates/language/src/buffer.rs | 3 +++
1 file changed, 3 insertions(+)

Detailed changes

crates/language/src/buffer.rs 🔗

@@ -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
         })
     }