adds setWrapLimit to session
This commit is contained in:
parent
340f004fd0
commit
b0c08dced1
2 changed files with 12 additions and 7 deletions
|
|
@ -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:
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue