From 1fb036811a87533fe8f39336f000335dfe8266b0 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Tue, 11 Jul 2017 11:34:31 +0100 Subject: [PATCH] Temporarily remove up-ranking of exact match --- .../auto-complete/SuggestionManager.coffee | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/SuggestionManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/SuggestionManager.coffee index 58d53db475..e415550253 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/SuggestionManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/SuggestionManager.coffee @@ -83,7 +83,7 @@ define [], () -> completions = [] for command in commands caption = "\\#{command[0]}" - score = if prefix == caption then 99 else 50 + score = 50 snippet = caption i = 1 _.times command[1], () -> @@ -94,12 +94,13 @@ define [], () -> snippet += "{${#{i}}}" caption += "{}" i++ - completions.push { - caption: caption - snippet: snippet - meta: "cmd" - score: score - } + unless caption == prefix + completions.push { + caption: caption + snippet: snippet + meta: "cmd" + score: score + } callback null, completions