Add reverse color option to text diff editor (#4826)

* Add reverse color option to text diff editor
This commit is contained in:
kisantia
2019-04-09 16:26:41 -07:00
committed by GitHub
parent b3be1d79cd
commit f98428aea5
5 changed files with 80 additions and 3 deletions

View File

@@ -42,6 +42,8 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor {
private diffNavigator: DiffNavigator;
private diffNavigatorDisposables: IDisposable[] = [];
// {{SQL CARBON EDIT}}
private reverseColor: boolean;
constructor(
@ITelemetryService telemetryService: ITelemetryService,
@@ -69,7 +71,17 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor {
return nls.localize('textDiffEditor', "Text Diff Editor");
}
// {{SQL CARBON EDIT}}
reverseColoring(): void {
this.reverseColor = true;
}
createEditorControl(parent: HTMLElement, configuration: ICodeEditorOptions): IDiffEditor {
// {{SQL CARBON EDIT}}
if (this.reverseColor) {
(configuration as IDiffEditorOptions).reverse = true;
}
return this.instantiationService.createInstance(DiffEditorWidget, parent, configuration);
}