diff --git a/src/EditorFeatures/Core/Preview/AbstractPreviewFactoryService.cs b/src/EditorFeatures/Core/Preview/AbstractPreviewFactoryService.cs index 7021b039a64e1..ddf867141412a 100644 --- a/src/EditorFeatures/Core/Preview/AbstractPreviewFactoryService.cs +++ b/src/EditorFeatures/Core/Preview/AbstractPreviewFactoryService.cs @@ -709,6 +709,10 @@ private async ValueTask> CreateNewDi rightWorkspace?.Dispose(); rightWorkspace = null; + + var inertContentType = _contentTypeRegistryService.GetContentType(StandardContentTypeNames.Inert); + originalBuffer.ChangeContentType(inertContentType, null); + changedBuffer.ChangeContentType(inertContentType, null); }; return CreateDifferenceViewerPreview(diffViewer);