File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/SharpIDE.Godot/Features/CodeEditor Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -106,9 +106,13 @@ private async Task OnSolutionAltered()
106106 var newCt = _solutionAlteredCancellationTokenSeries . CreateNext ( ) ;
107107 var documentSyntaxHighlighting = _roslynAnalysis . GetDocumentSyntaxHighlighting ( _currentFile , newCt ) ;
108108 var razorSyntaxHighlighting = _roslynAnalysis . GetRazorDocumentSyntaxHighlighting ( _currentFile , newCt ) ;
109- await Task . WhenAll ( documentSyntaxHighlighting , razorSyntaxHighlighting ) ;
109+ await Task . WhenAll ( documentSyntaxHighlighting , razorSyntaxHighlighting ) . WaitAsync ( newCt ) . ConfigureAwait ( ConfigureAwaitOptions . SuppressThrowing ) ;
110+ if ( newCt . IsCancellationRequested ) return ;
111+ var documentDiagnosticsTask = _roslynAnalysis . GetDocumentDiagnostics ( _currentFile , newCt ) ;
110112 await this . InvokeAsync ( async ( ) => SetSyntaxHighlightingModel ( await documentSyntaxHighlighting , await razorSyntaxHighlighting ) ) ;
111- var documentDiagnostics = await _roslynAnalysis . GetDocumentDiagnostics ( _currentFile , newCt ) ;
113+ await ( ( Task ) documentDiagnosticsTask ) . ConfigureAwait ( ConfigureAwaitOptions . SuppressThrowing ) ;
114+ if ( newCt . IsCancellationRequested ) return ;
115+ var documentDiagnostics = await documentDiagnosticsTask ;
112116 await this . InvokeAsync ( ( ) => SetDiagnostics ( documentDiagnostics ) ) ;
113117 }
114118
You can’t perform that action at this time.
0 commit comments