Fix panic when scrolling in project diff (#25771)

Cole Miller and Max created

It may happen that the column for the scroll anchor is nonzero, and the
adjustment we're doing here could result in an invalid point in that
case.

Release Notes:

- N/A

Co-authored-by: Max <max@zed.dev>

Change summary

crates/git_ui/src/project_diff.rs | 1 +
1 file changed, 1 insertion(+)

Detailed changes

crates/git_ui/src/project_diff.rs 🔗

@@ -281,6 +281,7 @@ impl ProjectDiff {
                 let snapshot = multibuffer.snapshot(cx);
                 let mut point = anchor.to_point(&snapshot);
                 point.row = (point.row + 1).min(snapshot.max_row().0);
+                point.column = 0;
 
                 let Some((_, buffer, _)) = self.multibuffer.read(cx).excerpt_containing(point, cx)
                 else {