do not call splice from resetRowCache unnecessarily
This commit is contained in:
parent
f76a4c5884
commit
95257a9be5
1 changed files with 5 additions and 5 deletions
|
|
@ -223,12 +223,12 @@ var EditSession = function(text, mode) {
|
||||||
this.$screenRowCache = [];
|
this.$screenRowCache = [];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;
|
|
||||||
var l = this.$docRowCache.length;
|
var l = this.$docRowCache.length;
|
||||||
this.$docRowCache.splice(i, l);
|
var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;
|
||||||
this.$screenRowCache.splice(i, l);
|
if (l > i) {
|
||||||
|
this.$docRowCache.splice(i, l);
|
||||||
|
this.$screenRowCache.splice(i, l);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$getRowCacheIndex = function(cacheArray, val) {
|
this.$getRowCacheIndex = function(cacheArray, val) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue