From 633195ea65a80c2f59a56c9917c0d4f5ceb01d93 Mon Sep 17 00:00:00 2001 From: Joseph Atkins-Turkish Date: Fri, 17 Jun 2016 14:08:03 -0700 Subject: [PATCH] Don't send requests YCM 'errors' requests for short files. --- ide/static/ide/js/editor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ide/static/ide/js/editor.js b/ide/static/ide/js/editor.js index cb746b54..b4ccea6d 100644 --- a/ide/static/ide/js/editor.js +++ b/ide/static/ide/js/editor.js @@ -328,6 +328,7 @@ CloudPebble.Editor = (function() { var throttled_check = _.throttle(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) {