add changes from newclient

This commit is contained in:
Harutyun Amirjanyan 2013-05-27 12:27:06 -04:00
commit d40a9a228f
4 changed files with 18 additions and 87 deletions

View file

@ -627,9 +627,9 @@ var Document = function(text) {
var index = 0;
var row = Math.min(pos.row, lines.length);
for (var i = startRow || 0; i < row; ++i)
index += lines[i].length;
index += lines[i].length + newlineLength;
return index + newlineLength * i + pos.column;
return index + pos.column;
};
}).call(Document.prototype);