Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #10093 from MarcelGerber/max-code-hints-fixup
Browse files Browse the repository at this point in the history
Fixup of maxCodeHints pref
  • Loading branch information
redmunds committed Dec 10, 2014
2 parents d9bc65e + 2af9c56 commit 5e6b9cf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/editor/CodeHintList.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ define(function (require, exports, module) {
* @constructor
* @param {Editor} editor
* @param {boolean} insertHintOnTab Whether pressing tab inserts the selected hint
* @param {number} maxResults Maximum hints displayed at once. Defaults to 1000
* @param {number} maxResults Maximum hints displayed at once. Defaults to 50
*/
function CodeHintList(editor, insertHintOnTab, maxResults) {

Expand All @@ -67,10 +67,7 @@ define(function (require, exports, module) {
*
* @type {number}
*/
this.maxResults = Math.min(
(maxResults > 0 && ValidationUtils.isInteger(maxResults) && maxResults) || 1000,
1000
);
this.maxResults = ValidationUtils.isIntegerInRange(maxResults, 1, 1000) ? maxResults : 50;

/**
* Is the list currently open?
Expand Down

0 comments on commit 5e6b9cf

Please sign in to comment.