4

I updated Visual Studio 2022 Preview to version 17.2 Preview 6.0, and after doing so, the colors and appearance of the changed lines indicators are "modernized" (similar to Visual Studio Codes) to be blue for modified lines (instead of yellow). There are also some other appearance changes, such as an unfilled green bar for added lines that aren't saved (which I think previously would also just be a yellow bar).

Bars

In this screenshot, the circled blue line is "Modified" (saved) which previously would be a green line I believe. The circled unfilled green bar is "Added - Not Saved".

I checked the preview patch notes, but nothing seems to point out what changes this. What is the setting for changing the behavior of these indicators?

Timothy G.
  • 6,335
  • 7
  • 30
  • 46
  • VS Code has such line highlighting bars? Never seen them. How can I enable them there? – ygoe Sep 07 '22 at 12:59
  • @ygoe this isn't for Visual Studio Code - this is Visual Studio 2022. Visual Studio Code does have a similar feature though, and I believe it enabled by default. Check you source control/Git settings in it. – Timothy G. Sep 07 '22 at 13:02
  • @ygoe in VS Code, I think the setting to enable them (or rather make them visible) is `scm.diffDecorationsGutterVisibility` – Timothy G. Sep 07 '22 at 13:12
  • Yes, I know this is about VS but VSCode was mentioned in the text. Oh, so VSCode only does it for Git (SCM), not for regular editing. – ygoe Sep 07 '22 at 13:57
  • @ygoe I believe so. VS Code is very heavily integrated with Git, so you probably need to have a git folder present for it to begin showing these lines and such. If you are just modifying a regular file outside of any kind of tracked project, these lines won't show up. This is probably also true for this feature in Visual Studio 2022 as well. – Timothy G. Sep 07 '22 at 14:10

1 Answers1

8

This is apart of the "Line Staging" feature, which is actually tied to Git. In update 17.2 of Visual Studio, the feature was turned on by default. The patch notes do mention this feature, but it's not readily obvious from the patch notes alone that this feature is what changed this.

Git Line Staging

By unchecking this checkbox and restarting Visual Studio, you can get back the original color scheme of the change indicators. Some of the other appearance changes do not revert back however. The changed line indicator is now an unfilled yellow bar (instead of solid) that turns to a solid green bar when saved. Obviously, you will also lose the ability to use any of the other features introduced with this feature when you uncheck this box.

It appears that there are also individual color settings that you can change if you want to keep this feature enabled but try and maintain the original color scheme of the indicators.

Timothy G.
  • 6,335
  • 7
  • 30
  • 46
  • The link to the release notes is unstable and has been replaced by other unrelated content. The original content cannot be found when navigating further to the 17.2 page. – Also, the blog article in the first link doesn't show how modified changed looks like. Those new colours are very much incomprehensible for me. Yellow and green was simple. *Git status is unrelated* and was provided by a separate extension as a second bar. – ygoe Sep 07 '22 at 13:05
  • @ygoe updated the link - "Git Tooling" section in the link should cover it. – Timothy G. Sep 07 '22 at 13:09