Merge pull request #234 from jviereck/master.

EditSession.$resetRowCache failed for row == 0
This commit is contained in:
Fabian Jakobs 2011-05-01 07:41:57 -07:00
commit ac8c73d390

View file

@ -106,11 +106,11 @@ var EditSession = function(text, mode) {
};
this.$resetRowCache = function(row) {
var rowCache = this.$rowCache;
if (row == 0) {
rowCache = [];
this.$rowCache = [];
return;
}
var rowCache = this.$rowCache;
for (var i = 0; i < rowCache.length; i++) {
if (rowCache[i].docRow >= row) {
rowCache.splice(i, rowCache.length);