20

I am seeing a little red marker in Visual Studio 22 Version 17.3.0 whenever code is deleted. The marker itself is fine, but what is bothering me is that in the scroll bar it shows a red section highlighted that makes me think it's an error. I would like to know if I can disable that.

code marker image

Timothy G.
  • 6,335
  • 7
  • 30
  • 46
Marcel Batista
  • 722
  • 6
  • 16
  • Are you using a default color theme for VS? – John Doe Aug 17 '22 at 00:19
  • Pretty sure you can turn off *all* the git change markers, not sure about just some. https://github.com/laurentkempe/GitDiffMargin/issues/123#issue-217206125 – GregHNZ Aug 17 '22 at 00:59

1 Answers1

17

I asked and answered a similar question about these lines. It's apart of the Line Staging feature that was introduced in 17.2. You can't toggle which lines/indicators you wish to see, but you can change their colors, or turn them completely off.

The particular color property you want to change is called "Track deletions in documents under source control":

enter image description here

If you change the RGB values to 46 (for all three) for both the foreground and background using the "Custom..." button next to each of the controls, you can get a near invisible line in the scroll bar (note this is for the default dark mode theme, you'll have to use a color dropper tool or something else to get the correct values for whatever theme you use). You can see the arrow indicator is still visible, since it doesn't match the background of the margin, but the line you want gone is virtually invisible apart from when you have your scroll bar within the line.

new colors

As mentioned before, the other alternative is to turn this feature off completely, which the linked post goes over. It's under the Preview Features tab:

enter image description here

Timothy G.
  • 6,335
  • 7
  • 30
  • 46
  • 1
    Unfortunately this noise is no longer a preview feature, but it can be disabled by unchecking `Options` -> `Text Editor` -> `General` -> `Track changes` ... this, too, removes _all_ change tracking, not just the misleading "deletion masquerading as an error". Sometimes I wonder if anyone at MS actually uses their own apps any more. – McGuireV10 Jun 30 '23 at 16:28
  • @McGuireV10 yeah unfortunately they've kind of forced this down our throats. I noticed this on another similar answer of mine https://stackoverflow.com/questions/74164582/how-to-remove-git-difference-indicators-in-visual-studio-2022/74181964#comment134867371_74181964 and I've been keeping tabs on whether or not they make an update to re-add disabling this. I never see the oldschool yellow and green change indicators anymore, its just the blue and green Git ones. I've come to adapt to them, but its sad that we can't have it the way we want. – Timothy G. Jun 30 '23 at 16:53