From b3443a0fab1b4fe1d765eda18991c9b02cdaadf2 Mon Sep 17 00:00:00 2001 From: rmsmith Date: Fri, 6 Sep 2013 16:16:15 +0300 Subject: [PATCH] `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. --- lib/ace/edit_session.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js index c65e6818..9f31841c 100644 --- a/lib/ace/edit_session.js +++ b/lib/ace/edit_session.js @@ -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");