adds setWrapLimit to session

This commit is contained in:
Matthew Kastor 2013-04-01 15:57:30 -04:00 • committed by nightwing
commit b0c08dced1
2 changed files with 12 additions and 7 deletions

View file

@ -1612,7 +1612,18 @@ var EditSession = function(text, mode) {
this.getWrapLimit = function() {
return this.$wrapLimit;
};
/**
* Sets the line length for soft wrap in the editor. Lines will break
* at a minimum of the given length minus 20 chars and at a maximum
* of the given number of chars.
* @param {number} limit The maximum line length in chars, for soft
* wrapping lines.
*/
this.setWrapLimit = function (limit) {
this.setWrapLimitRange(limit - 20, limit);
};
/**
* Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
*