File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/LanguageServer/Protocol/Handler/Diagnostics Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -34,16 +34,16 @@ protected override ValueTask<ImmutableArray<IDiagnosticSource>> GetOrderedDiagno
34
34
//
35
35
// Only consider open documents here (and only closed ones in the WorkspacePullDiagnosticHandler). Each
36
36
// handler treats those as separate worlds that they are responsible for.
37
- var textDocument = context . TextDocument ;
38
- if ( textDocument is null )
37
+ var identifier = GetTextDocumentIdentifier ( diagnosticsParams ) ;
38
+ if ( identifier is null || context . Document is null )
39
39
{
40
40
context . TraceDebug ( "Ignoring diagnostics request because no text document was provided" ) ;
41
41
return new ( [ ] ) ;
42
42
}
43
43
44
- if ( ! context . IsTracking ( textDocument . GetURI ( ) ) )
44
+ if ( ! context . IsTracking ( identifier . DocumentUri ) )
45
45
{
46
- context . TraceWarning ( $ "Ignoring diagnostics request for untracked document: { textDocument . GetURI ( ) } ") ;
46
+ context . TraceWarning ( $ "Ignoring diagnostics request for untracked document: { identifier . DocumentUri } ") ;
47
47
return new ( [ ] ) ;
48
48
}
49
49
You can’t perform that action at this time.
0 commit comments