Index: pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart |
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart |
index 1290f70ae764e4f5f20277db247b9558f8d99439..724e084efb17001f132a4a2eb08bb866fe3e6607 100644 |
--- a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart |
+++ b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart |
@@ -229,7 +229,13 @@ class DartCompletionRequestImpl implements DartCompletionRequest { |
} |
@override |
- String get sourceContents => context.getContents(source)?.data; |
+ String get sourceContents { |
+ if (result != null) { |
+ return result.content; |
+ } else { |
+ return context.getContents(source)?.data; |
+ } |
+ } |
@override |
SourceFactory get sourceFactory { |