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:
rmsmith 2013-09-06 16:16:15 +03:00
commit b3443a0fab

View file

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