I have been using VS Code for years at this point, but sometime last month the diff view stopped showing the removed lines from the diff view, so only the green lines are shown even though the red lines still appear in the scroll bar.


if I then drag the diff viewer into another view (left/right/down) they appear again until I change files and then the removed lines disappear again. they do the same if I click the "split editor right" button.
none of the other diff view buttons or options cause the red lines to show, nor could I find any obvious config changes (I haven't changed config in over a year) that would cause this.

How do I go about fixing this?
This has been labelled as a bug by the VS Code maintainers: Diff Inline View is not showing removed code #192957.
Some users say that they can work around the issue by reloading the window (use the Developer: Reload Window command in the command palette). Someone also found that the problem goes away if they toggle the diffEditor.renderSideBySide setting. Maybe that will work for you too.
As for a real fix, wait patiently. The issue ticket is currently in the November 2023 (v1.85) release milestone. It might actually be a duplicate of diffEditorViewModel breaks when previous _unchangedRegions is non-empty #198516, which is fixed and scheduled for the November 2023 release as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With