From e8b2166ef375c98fabbdefca09ca5fe905cd509b Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Thu, 25 Apr 2024 12:53:14 +0200 Subject: [PATCH] Show git gutter indicators in both panes when using `Split Editor In Group` Fixes #211257 --- .../workbench/browser/parts/editor/sideBySideEditor.ts | 5 +++++ src/vs/workbench/common/editor.ts | 10 ++++++++++ .../workbench/services/editor/browser/editorService.ts | 10 ++++++---- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts b/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts index c3d7a0cce9da..35846e76c3bb 100644 --- a/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts +++ b/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts @@ -32,6 +32,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic import { isEqual } from 'vs/base/common/resources'; import { URI } from 'vs/base/common/uri'; import { IBoundarySashes } from 'vs/base/browser/ui/sash/sash'; +import { coalesce } from 'vs/base/common/arrays'; interface ISideBySideEditorViewState { primary: object; @@ -455,6 +456,10 @@ export class SideBySideEditor extends AbstractEditorWithViewState { const visibleTextEditorControls: Array = []; for (const visibleEditorPane of this.visibleEditorPanes) { - const control = visibleEditorPane.getControl(); - if (isCodeEditor(control) || isDiffEditor(control)) { - visibleTextEditorControls.push(control); + const controls: (IEditorControl | undefined)[] = visibleEditorPane.getControls ? visibleEditorPane.getControls() : [visibleEditorPane.getControl()]; + for (const control of controls) { + if (isCodeEditor(control) || isDiffEditor(control)) { + visibleTextEditorControls.push(control); + } } }