Skip to content

Commit 426346f

Browse files
author
Arthur Reading
committed
Limit length of GUI autocomplete to 1000
1 parent 91d46c5 commit 426346f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

notebook/static/notebook/js/completer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ define([
306306
};
307307

308308
Completer.prototype.build_gui_list = function (completions) {
309-
for (var i = 0; i < completions.length; ++i) {
309+
var MAXIMUM_GUI_LIST_LENGTH = 1000;
310+
for (var i = 0; i < completions.length && i < MAXIMUM_GUI_LIST_LENGTH; ++i) {
310311
var opt = $('<option/>').text(completions[i].str).addClass(completions[i].type);
311312
this.sel.append(opt);
312313
}

0 commit comments

Comments
 (0)