# Add side-by-side split diff view to FileDiffView \(\#50046\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/9c5d609543807e9d1ffd7c502118e16f53ec6bd4)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 9c5d609543807e9d1ffd7c502118e16f53ec6bd4

Requested commit: 9c5d609543807e9d1ffd7c502118e16f53ec6bd4

Commit: 9c5d609543807e9d1ffd7c502118e16f53ec6bd4

Tree: 8138cf17ca68871f074f2890e829b4e2597727da

Author: NaritaHARUKI

Committer: GitHub

## Message

```
Add side-by-side split diff view to FileDiffView (#50046)

## Summary
- Enable VSCode-like side-by-side file comparison in FileDiffView using
SplittableEditor
- Leverages existing SplittableEditor infrastructure that ProjectDiff
already uses
- Controlled by the user's `diff_view_style` setting (split/unified)

## Changes
- `crates/git_ui/src/file_diff_view.rs`: Refactored to use
SplittableEditor instead of plain Editor (+66/-30 lines)

## Test plan
- [ ] Open a file with git changes and verify the diff view renders
correctly
- [ ] Toggle between split and unified diff view styles via settings
- [ ] Verify side-by-side comparison shows old/new content correctly

Release Notes:

- Enabled side by side diffs in the file diff view

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
```

## Parents

- [9cb8d97f6119705d14b804edc6ddf54c30000b2b](https://git.cafe/gitcafe/zed/commit/9cb8d97f6119705d14b804edc6ddf54c30000b2b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/9c5d609543807e9d1ffd7c502118e16f53ec6bd4?format=markdown)
