Marcel Batista
Marcel Batista

Reputation: 752

How to remove the 'Deleted' Git code marker in scrollbar in Visual Studio 2022?

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

Upvotes: 22

Views: 1937

Answers (1)

Timothy G.
Timothy G.

Reputation: 9055

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

Upvotes: 19

Related Questions