Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is VS Code 1.82-1.84 hiding removed lines from diffs?

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.

missing red linesmissing red lines

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.

diff view buttons & options

How do I go about fixing this?

like image 641
fbstj Avatar asked Oct 24 '25 14:10

fbstj


1 Answers

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.

like image 61
starball Avatar answered Oct 27 '25 05:10

starball