Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 29241: Add option to disable git indicators in gutter #29700

Merged
merged 1 commit into from Dec 11, 2017

Conversation

BuraChuhadar
Copy link
Contributor

Feature #29241: Add option to disable git indicators in gutter

@mention-bot
Copy link

@bugrac, thanks for your PR! By analyzing the history of the files in this pull request, we identified @joaomoreno and @alexandrudima to be potential reviewers.

Copy link
Member

@joaomoreno joaomoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If decorators are to be disabled, more needs to be done:

  • You need to dispose and clean out all instances of DirtyDiffModelDecorator.
  • You need to detach the onEditorsChanged listener.

You're also missing a configuration change listener, which should enable/disable the decorations accordingly.

@@ -82,6 +83,20 @@ const viewletDescriptor = new ViewletDescriptor(
36
);

// Configuration
Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).registerConfiguration({
id: 'editor',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be scm

order: 5,
type: 'object',
properties: {
'editor.enableDecorators': {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property should be scm.enableDiffDecorations.

'editor.enableDecorators': {
'type': 'boolean',
'default': true,
'description': localize('enableDecorators', "Enables or disables color decorators when changes happen in the editor.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enables or disables diff decorations in modified files.

@joaomoreno joaomoreno modified the milestones: Backlog, December 2017 Dec 11, 2017
@joaomoreno joaomoreno merged commit 88f0243 into microsoft:master Dec 11, 2017
@joaomoreno
Copy link
Member

Thanks! 🍻

@joaomoreno
Copy link
Member

Went ahead and changed the setting to accommodate #21795

You can now control this with scm.diffDecorations, which has the following possible values: ['all', 'gutter', 'overview', 'none'].

@malimccalla
Copy link

malimccalla commented Mar 31, 2018

Thanks guys, great change. I've just switched to VS code and I'm curios why the modified colour for the gutter is blue whilst the modified colour on the file name itself is orange. To me it makes sense to make these the same colour by default

"gitDecoration.modifiedResourceForeground",
"editorGutter.modifiedBackground"

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants