Fixing Edit_Session.$resetRowCache in case row == 0.

This commit is contained in:
Julian Viereck 2011-05-01 12:25:17 +02:00
commit 2518c26d7e

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);