mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Merge pull request #3195 from areading314/ar/limit_autcomplete_elements
Limit length of GUI autocomplete to 1000
This commit is contained in:
commit
31215b857c
@ -306,7 +306,8 @@ define([
|
||||
};
|
||||
|
||||
Completer.prototype.build_gui_list = function (completions) {
|
||||
for (var i = 0; i < completions.length; ++i) {
|
||||
var MAXIMUM_GUI_LIST_LENGTH = 1000;
|
||||
for (var i = 0; i < completions.length && i < MAXIMUM_GUI_LIST_LENGTH; ++i) {
|
||||
var opt = $('<option/>').text(completions[i].str).addClass(completions[i].type);
|
||||
this.sel.append(opt);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user