File tree 1 file changed +9
-0
lines changed
src/EditorFeatures/Core/Implementation/Preview
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -573,6 +573,15 @@ private async Task<object> CreateNewDifferenceViewerAsync(
573
573
574
574
diffViewer . Closed += ( s , e ) =>
575
575
{
576
+ // Workaround Editor bug. The editor has an issue where they sometimes crash when
577
+ // trying to apply changes to projection buffer. So, when the user actually invokes
578
+ // a SuggestedAction we may then edit a text buffer, which the editor will then
579
+ // try to propagate through the projections we have here over that buffer. To ensure
580
+ // that that doesn't happen, we clear out the projections first so that this crash
581
+ // won't happen.
582
+ originalBuffer . DeleteSpans ( 0 , originalBuffer . CurrentSnapshot . SpanCount ) ;
583
+ changedBuffer . DeleteSpans ( 0 , changedBuffer . CurrentSnapshot . SpanCount ) ;
584
+
576
585
leftWorkspace ? . Dispose ( ) ;
577
586
leftWorkspace = null ;
578
587
You can’t perform that action at this time.
0 commit comments