make foldAll faster
This commit is contained in:
parent
4e82a96353
commit
1b21841dba
4 changed files with 98 additions and 83 deletions
|
|
@ -31,9 +31,9 @@
|
|||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var config = require("./config");
|
||||
var oop = require("./lib/oop");
|
||||
var lang = require("./lib/lang");
|
||||
var config = require("./config");
|
||||
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
||||
var Selection = require("./selection").Selection;
|
||||
var TextMode = require("./mode/text").Mode;
|
||||
|
|
@ -41,7 +41,6 @@ var Range = require("./range").Range;
|
|||
var Document = require("./document").Document;
|
||||
var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer;
|
||||
var SearchHighlight = require("./search_highlight").SearchHighlight;
|
||||
var config = require("./config");
|
||||
|
||||
/**
|
||||
* Stores all the data about [[Editor `Editor`]] state providing easy way to change editors state.
|
||||
|
|
@ -1377,8 +1376,8 @@ var EditSession = function(text, mode) {
|
|||
};
|
||||
|
||||
this.$moveLines = function(firstRow, lastRow, dir) {
|
||||
var firstRow = this.getRowFoldStart(firstRow);
|
||||
var lastRow = this.getRowFoldEnd(lastRow);
|
||||
firstRow = this.getRowFoldStart(firstRow);
|
||||
lastRow = this.getRowFoldEnd(lastRow);
|
||||
if (dir < 0) {
|
||||
var row = this.getRowFoldStart(firstRow + dir);
|
||||
if (row < 0) return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue