From 2518c26d7e3d732f096453b16c0fd0e4cdb366e0 Mon Sep 17 00:00:00 2001 From: Julian Viereck Date: Sun, 1 May 2011 12:25:17 +0200 Subject: [PATCH] Fixing Edit_Session.$resetRowCache in case row == 0. --- lib/ace/edit_session.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js index 1b853c71..fc4a3fcf 100644 --- a/lib/ace/edit_session.js +++ b/lib/ace/edit_session.js @@ -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);