Limit length of GUI autocomplete to 1000

This commit is contained in:
Arthur Reading 2018-01-09 11:41:52 -08:00
parent 91d46c5328
commit 426346fc91

View File

@ -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);
}