Skip to content

Commit 31215b8

Browse files
authored
Merge pull request jupyter#3195 from areading314/ar/limit_autcomplete_elements
Limit length of GUI autocomplete to 1000
2 parents 6526a19 + 426346f commit 31215b8

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)