简体   繁体   中英

Visual Studio 22, git 'Deleted' code marker

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 for my sanity =)

在此处输入图像描述

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":

在此处输入图像描述

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.

新颜色

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:

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM