From d7d396627a13480c64a4090593cbe18ba51b65bb Mon Sep 17 00:00:00 2001 From: Joseph Atkins-Turkish Date: Fri, 17 Jun 2016 13:44:27 -0700 Subject: [PATCH] Don't send YCMD requests for comments --- ide/static/ide/js/autocomplete.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ide/static/ide/js/autocomplete.js b/ide/static/ide/js/autocomplete.js index ecc77534..ac721cbf 100644 --- a/ide/static/ide/js/autocomplete.js +++ b/ide/static/ide/js/autocomplete.js @@ -148,6 +148,9 @@ CloudPebble.Editor.Autocomplete = new (function() { if(!token || (token.string.replace(/[^a-z0-9_]/gi, '').length < 1 && token.string != '.' && token.string != '->')) { return; } + if (token.type == "comment") { + return; + } } catch(e) { return; }