Fix two bugs in new diff hunk handling (#23990)

Closes https://github.com/zed-industries/zed/issues/23981

Release Notes:

- Fixed a crash that could happen when expanding certain diff hunks
- Fixed a bug where diff hunks were not syntax highlighted when
reopening a project with previously-opened buffers.
b6e54ae2f1Max Brunsfeld committed on 1/31/2025, 1:03:53 AM· committed by GitHubparent9c34820
3 files changedLine totals unavailable