This commit is contained in:
nightwing 2013-03-30 16:02:55 +04:00
commit 10bbd842a3
2 changed files with 4 additions and 2 deletions

View file

@ -2404,8 +2404,8 @@ config.defineOptions(EditSession.prototype, "session", {
this.setUseWrapMode(false); this.setUseWrapMode(false);
} else { } else {
var col = typeof value == "number" ? value : null; var col = typeof value == "number" ? value : null;
this.setUseWrapMode(true);
this.setWrapLimitRange(col, col); this.setWrapLimitRange(col, col);
this.setUseWrapMode(true);
} }
this.$wrap = value; this.$wrap = value;
}, },

View file

@ -914,6 +914,8 @@ module.exports = {
session.addFold('...', new Range(3, 7, 3, 51)); session.addFold('...', new Range(3, 7, 3, 51));
session.setOption("wrap", 40); session.setOption("wrap", 40);
session.remove(new Range(0,0, 2, 5)); session.remove(new Range(0,0, 2, 5));
// needed because adjustWrapLimit is called async from renderer
session.adjustWrapLimit(80);
assert.equal(session.$wrapData + "", [[], [], [40, 76]] + ""); assert.equal(session.$wrapData + "", [[], [], [40, 76]] + "");
}, },