From 136adbed5bdcbca1510f8e4dd5eacd1f4ea63c49 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 4 Aug 2021 12:29:07 -0700 Subject: [PATCH] fix #129783. --- .../notebook/browser/diff/notebookTextDiffEditor.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor.ts b/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor.ts index d95a67b1dc4..4be73b5fcd0 100644 --- a/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor.ts +++ b/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor.ts @@ -9,7 +9,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { IEditorOpenContext } from 'vs/workbench/common/editor'; -import { getDefaultNotebookCreationOptions, notebookCellBorder, NotebookEditorWidget } from 'vs/workbench/contrib/notebook/browser/notebookEditorWidget'; +import { cellEditorBackground, getDefaultNotebookCreationOptions, notebookCellBorder, NotebookEditorWidget } from 'vs/workbench/contrib/notebook/browser/notebookEditorWidget'; import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService'; import { NotebookDiffEditorInput } from '../notebookDiffEditorInput'; import { CancellationToken } from 'vs/base/common/cancellation'; @@ -905,6 +905,13 @@ registerThemingParticipant((theme, collector) => { } `); + const editorBackgroundColor = theme.getColor(cellEditorBackground) ?? theme.getColor(editorBackground); + if (editorBackgroundColor) { + collector.addRule(`.notebook-text-diff-editor .cell-body .cell-diff-editor-container .source-container .monaco-editor .margin, + .notebook-text-diff-editor .cell-body .cell-diff-editor-container .source-container .monaco-editor .monaco-editor-background { background: ${editorBackgroundColor}; }` + ); + } + const added = theme.getColor(diffInserted); if (added) { collector.addRule(