EditSession.setWrapLimitRange should set a new object to this.$wrapLimitRange
This fixes a bug where if you have 2 instances of EditSession and you `setWrapLimitRange` on one of them it would affect the $wrapLimitRange on all other instances of EditSession.
This commit is contained in:
parent
43d2a6607f
commit
b3443a0fab
1 changed files with 4 additions and 2 deletions
|
|
@ -1574,8 +1574,10 @@ var EditSession = function(text, mode) {
|
|||
**/
|
||||
this.setWrapLimitRange = function(min, max) {
|
||||
if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {
|
||||
this.$wrapLimitRange.min = min;
|
||||
this.$wrapLimitRange.max = max;
|
||||
this.$wrapLimitRange = {
|
||||
min: min,
|
||||
max: max
|
||||
};
|
||||
this.$modified = true;
|
||||
// This will force a recalculation of the wrap limit
|
||||
this._emit("changeWrapMode");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue