if (typeof(pos) == 'undefined' || pos >= this.cm.config.length) {
pos = this.cm.config.length; //this.cm.config.push(cfg);
}
- pos = Math.max(0,pos);
- ar.shift(ar.length);
- ar.shift(pos);
- this.cm.config.splice.call(ar);
-
- this.cm.config.splice(pos, 0, cfg);
- }
+ pos = Math.max(0,pos);
+ ar.unshift(0);
+ ar.unshift(pos);
+ this.cm.config.splice.apply(this.cm.config, ar);
+
this.view.generateRules(this.cm);