Skip to content

Commit 2f5ae91

Browse files
author
Joseph Atkins-Turkish
committed
Don't send requests YCM 'errors' requests for short files.
1 parent 6cd3ffc commit 2f5ae91

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ide/static/ide/js/editor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ CloudPebble.Editor = (function() {
328328
var throttled_check = _.throttle(function() {
329329
if(sChecking) return;
330330
sChecking = true;
331+
if (code_mirror.getValue().match(/\n/g).length < 5) return;
331332
CloudPebble.YCM.request('errors', code_mirror)
332333
.then(function(data) {
333334
_.each(clang_lines, function(line) {

0 commit comments

Comments
 (0)