diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index d278254f..f30a0467 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -46,7 +46,7 @@ var domline = require('./domline').domline; var AttribPool = require('./AttributePool'); var Changeset = require('./Changeset'); var linestylefilter = require('./linestylefilter').linestylefilter; -var newSkipList = require('./skiplist').newSkipList; +var SkipList = require('./skiplist'); var undoModule = require('./undomodule').undoModule; var makeVirtualLineView = require('./virtual_lines').makeVirtualLineView; @@ -95,7 +95,7 @@ function Ace2Inner(){ // native IE selections have that behavior (which we try not to interfere with). // Must be false if selection is collapsed! var rep = { - lines: newSkipList(), + lines: new SkipList(), selStart: null, selEnd: null, selFocusAtStart: false, diff --git a/src/static/js/skiplist.js b/src/static/js/skiplist.js index 190bc55b..2132d8e3 100644 --- a/src/static/js/skiplist.js +++ b/src/static/js/skiplist.js @@ -20,11 +20,11 @@ * limitations under the License. */ +var Ace2Common = require('./ace2_common'); +var noop = Ace2Common.noop; +var extend = Ace2Common.extend; -var noop = require('./ace2_common').noop; - - -function newSkipList() +function SkipList() { var PROFILER = window.PROFILER; if (!PROFILER) @@ -284,27 +284,6 @@ function newSkipList() } return dist; } -/*function _debugToString() { - var array = [start]; - while (array[array.length-1] !== end) { - array[array.length] = array[array.length-1].downPtrs[0]; - } - function getIndex(node) { - if (!node) return null; - for(var i=0;i