Merge pull request #1260 from ajaxorg/toggleComment
Improve toggleCommentLines and make it faster
This commit is contained in:
commit
1b8fb10e50
52 changed files with 371 additions and 774 deletions
|
|
@ -222,12 +222,12 @@ var EditSession = function(text, mode) {
|
|||
this.$screenRowCache = [];
|
||||
return;
|
||||
}
|
||||
|
||||
var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;
|
||||
var l = this.$docRowCache.length;
|
||||
this.$docRowCache.splice(i, l);
|
||||
this.$screenRowCache.splice(i, l);
|
||||
|
||||
var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;
|
||||
if (l > i) {
|
||||
this.$docRowCache.splice(i, l);
|
||||
this.$screenRowCache.splice(i, l);
|
||||
}
|
||||
};
|
||||
|
||||
this.$getRowCacheIndex = function(cacheArray, val) {
|
||||
|
|
@ -426,8 +426,7 @@ var EditSession = function(text, mode) {
|
|||
|
||||
self.$deltas = [];
|
||||
}
|
||||
this.$informUndoManager =
|
||||
lang.deferredCall(this.$syncInformUndoManager);
|
||||
this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue