avoid emitting spurious changeWrapMode event
This commit is contained in:
parent
847bfa4bfe
commit
7db217dfe0
1 changed files with 4 additions and 6 deletions
|
|
@ -1580,13 +1580,11 @@ var EditSession = function(text, mode) {
|
|||
**/
|
||||
this.setWrapLimitRange = function(min, max) {
|
||||
if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {
|
||||
this.$wrapLimitRange = {
|
||||
min: min,
|
||||
max: max
|
||||
};
|
||||
this.$wrapLimitRange = { min: min, max: max };
|
||||
this.$modified = true;
|
||||
// This will force a recalculation of the wrap limit
|
||||
this._signal("changeWrapMode");
|
||||
if (this.$useWrapMode)
|
||||
this._signal("changeWrapMode");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -2467,6 +2465,7 @@ config.defineOptions(EditSession.prototype, "session", {
|
|||
|
||||
if (this.$wrap == value)
|
||||
return;
|
||||
this.$wrap = value;
|
||||
if (!value) {
|
||||
this.setUseWrapMode(false);
|
||||
} else {
|
||||
|
|
@ -2474,7 +2473,6 @@ config.defineOptions(EditSession.prototype, "session", {
|
|||
this.setWrapLimitRange(col, col);
|
||||
this.setUseWrapMode(true);
|
||||
}
|
||||
this.$wrap = value;
|
||||
},
|
||||
get: function() {
|
||||
if (this.getUseWrapMode()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue