From ccdeb581e7310bdb8d6621c83c4aafcefde7b127 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 21 Dec 2018 07:55:50 +0100 Subject: [PATCH] Mitigate #6044 and don't call suggestions for small identifiers --- src/fsharp/ErrorResolutionHints.fs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fsharp/ErrorResolutionHints.fs b/src/fsharp/ErrorResolutionHints.fs index e674adb6f46..6ac6fd669ca 100644 --- a/src/fsharp/ErrorResolutionHints.fs +++ b/src/fsharp/ErrorResolutionHints.fs @@ -24,7 +24,8 @@ let IsInEditDistanceProximity idText suggestion = editDistance <= threshold /// Filters predictions based on edit distance to the given unknown identifier. -let FilterPredictions (idText:string) (suggestionF:ErrorLogger.Suggestions) = +let FilterPredictions (idText:string) (suggestionF:ErrorLogger.Suggestions) = + if idText.Length < 5 then [] else // we should not try to suggest all the time when people are typing let uppercaseText = idText.ToUpperInvariant() let allSuggestions = suggestionF()