diff --git a/ide/static/ide/js/autocomplete.js b/ide/static/ide/js/autocomplete.js index a7f002d6..6f6696ae 100644 --- a/ide/static/ide/js/autocomplete.js +++ b/ide/static/ide/js/autocomplete.js @@ -217,6 +217,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; } diff --git a/ide/static/ide/js/editor.js b/ide/static/ide/js/editor.js index ac4498a5..612a8f4f 100644 --- a/ide/static/ide/js/editor.js +++ b/ide/static/ide/js/editor.js @@ -387,6 +387,7 @@ CloudPebble.Editor = (function() { var debounced_check = _.debounce(function() { if(sChecking) return; sChecking = true; + if (code_mirror.getValue().match(/\n/g).length < 5) return; CloudPebble.YCM.request('errors', code_mirror) .then(function(data) { _.each(clang_lines, function(line) {