From ed167f4db7f6dcdf69dfafd2cc3eeded2a7833c8 Mon Sep 17 00:00:00 2001 From: Henning Dieterichs Date: Tue, 6 Aug 2024 18:30:48 +0200 Subject: [PATCH] Fixes https://github.com/microsoft/vscode-copilot/issues/7122 --- .../components/diffEditorViewZones/diffEditorViewZones.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.ts b/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.ts index cfbad5b68b3..3b1b222de0d 100644 --- a/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.ts +++ b/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.ts @@ -633,7 +633,10 @@ export function allowsTrueInlineDiffRendering(mapping: DetailedLineRangeMapping) if (!mapping.innerChanges) { return false; } - return mapping.innerChanges.every(c => rangeIsSingleLine(c.modifiedRange) && rangeIsSingleLine(c.originalRange)); + return mapping.innerChanges.every(c => + (rangeIsSingleLine(c.modifiedRange) && rangeIsSingleLine(c.originalRange)) + || c.originalRange.equalsRange(new Range(1, 1, 1, 1)) + ); } function rangeIsSingleLine(range: Range): boolean {