Explorar o código

Prevent duplicate diagnostics

Sebastien Lebreton %!s(int64=5) %!d(string=hai) anos
pai
achega
4913a3fee0
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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)) {