add wrapMethod:auto and fix tests

This commit is contained in:
nightwing 2013-07-24 15:48:52 +04:00
commit 62e7073b33
9 changed files with 35 additions and 31 deletions

View file

@ -457,9 +457,9 @@ var Text = function(parentEl) {
return screenColumn + value.length;
};
this.renderIndentGuide = function(stringBuilder, value) {
this.renderIndentGuide = function(stringBuilder, value, max) {
var cols = value.search(this.$indentGuideRe);
if (cols <= 0)
if (cols <= 0 || cols >= max)
return value;
if (value[0] == " ") {
cols -= cols % this.tabSize;
@ -483,7 +483,7 @@ var Text = function(parentEl) {
var value = token.value;
if (i == 0 && this.displayIndentGuides) {
chars = value.length;
value = this.renderIndentGuide(stringBuilder, value);
value = this.renderIndentGuide(stringBuilder, value, splitChars);
if (!value)
continue;
chars -= value.length;