From 38742401c97531d166ad5a02b4e45de913ec272f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Sun, 18 Mar 2012 11:34:56 +0100 Subject: [PATCH] newSkipList() -> new SkipList() --- src/static/js/ace2_inner.js | 4 ++-- src/static/js/skiplist.js | 36 +++++++----------------------------- 2 files changed, 9 insertions(+), 31 deletions(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index d278254ff..f30a0467d 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 190bc55b9..2132d8e30 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