提交 edd5aba8 编写于 作者: J Joao Moreno

Merge branch 'Feature-29241' of https://github.com/BuraChuhadar/vscode into...

Merge branch 'Feature-29241' of https://github.com/BuraChuhadar/vscode into BuraChuhadar-Feature-29241
......@@ -19,6 +19,7 @@ import { IMessageService, Severity } from 'vs/platform/message/common/message';
import { ITextModelService } from 'vs/editor/common/services/resolverService';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import URI from 'vs/base/common/uri';
import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService';
import { ISCMService, ISCMRepository } from 'vs/workbench/services/scm/common/scm';
......@@ -1006,7 +1007,8 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution,
constructor(
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
@IEditorGroupService editorGroupService: IEditorGroupService,
@IInstantiationService private instantiationService: IInstantiationService
@IInstantiationService private instantiationService: IInstantiationService,
@IConfigurationService private configurationService: IConfigurationService
) {
this.disposables.push(editorGroupService.onEditorsChanged(() => this.onEditorsChanged()));
}
......@@ -1016,6 +1018,12 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution,
// or not. Needs context from the editor, to know whether it is a diff editor, in place editor
// etc.
const enableDecorators = this.configurationService.getValue('editor.enableDecorators');
if (!enableDecorators) {
return;
}
const models = this.editorService.getVisibleEditors()
// map to the editor controls
......
......@@ -19,6 +19,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi
import { StatusUpdater, StatusBarController } from './scmActivity';
import { SCMViewlet } from 'vs/workbench/parts/scm/electron-browser/scmViewlet';
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry';
class OpenSCMViewletAction extends ToggleViewletAction {
......@@ -61,3 +62,16 @@ Registry.as<IWorkbenchActionRegistry>(WorkbenchActionExtensions.WorkbenchActions
'View: Show SCM',
localize('view', "View")
);
Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).registerConfiguration({
id: 'editor',
order: 5,
type: 'object',
properties: {
'editor.enableDecorators': {
'type': 'boolean',
'default': true,
'description': localize('enableDecorators', "Enables or disables color decorators when changes happen in the editor.")
},
}
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册