From 5933e313e5d701d950e7974b69eba8fed8d855e4 Mon Sep 17 00:00:00 2001 From: Alexandru Dima Date: Thu, 11 Feb 2021 12:23:47 +0100 Subject: [PATCH] Fixes #116060: Clone minimap options before changing them --- src/vs/editor/browser/widget/diffEditorWidget.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 014a1d685068..53615b318ac2 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -1140,15 +1140,15 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE const clonedOptions = { ...options }; clonedOptions.inDiffEditor = true; clonedOptions.automaticLayout = false; - clonedOptions.scrollbar = clonedOptions.scrollbar || {}; + // Clone scrollbar options before changing them + clonedOptions.scrollbar = { ...(clonedOptions.scrollbar || {}) }; clonedOptions.scrollbar.vertical = 'visible'; clonedOptions.folding = false; clonedOptions.codeLens = this._diffCodeLens; clonedOptions.fixedOverflowWidgets = true; // clonedOptions.lineDecorationsWidth = '2ch'; - if (!clonedOptions.minimap) { - clonedOptions.minimap = {}; - } + // Clone minimap options before changing them + clonedOptions.minimap = { ...(clonedOptions.minimap || {}) }; clonedOptions.minimap.enabled = false; return clonedOptions; }