소스 검색

Prevent duplicate diagnostics

Sebastien Lebreton 5 년 전
부모
커밋
4913a3fee0
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      Playground/js/monacoCreator.js

+ 4 - 0
Playground/js/monacoCreator.js

@@ -124,6 +124,10 @@ class MonacoCreator {
                 const wordInfo = model.getWordAtPosition(position);
                 const offset = model.getOffsetAt(position);
 
+                // continue if we already found an issue here
+                if (markers.find(m => m.startLineNumber == position.lineNumber && m.startColumn == position.column))
+                    continue;
+
                 // the following is time consuming on all suggestions, that's why we precompute deprecated candidate names in the definition worker to filter calls
                 const details = await languageService.getCompletionEntryDetails(uri.toString(), offset, wordInfo.word);
                 if (this.isDeprecatedEntry(details)) {