笙默考试管理系统-MyExamTest----codemirror(56)
目录
一、 笙默考试管理系统-MyExamTest----codemirror
二、 笙默考试管理系统-MyExamTest----codemirror
三、 笙默考试管理系统-MyExamTest----codemirror
四、 笙默考试管理系统-MyExamTest----codemirror
五、 笙默考试管理系统-MyExamTest----codemirror
????????return chunk.lines[n];
????}
????
????History.prototype = {
????????addChange: function(start, added, old) {
????????????this.undone.length = 0;
????????????var time = +new Date, last = this.done[this.done.length - 1];
????????????if (time - this.time > 400 || !last ||
????????????????last.start > start + added || last.start + last.added < start - last.added + last.old.length)
????????????????this.done.push({start: start, added: added, old: old});
????????????else {
????????????????var oldoff = 0;
????????????????if (start < last.start) {
????????????????????for (var i = last.start - start - 1; i >= 0; --i)
????????????????????????last.old.unshift(old[i]);
????????????????????last.added += last.start - start;
????????????????????last.start = start;
????????????????}
????????????????else if (last.start < start) {
????????????????????oldoff = start - last.start;
????????????????????added += oldoff;
????????????????}
????????????????for (var i = last.added - oldoff, e = old.length; i < e; ++i)
????????????????????last.old.push(old[i]);
????????????????if (last.added < added) last.added = added;
????????????}
????????????this.time = time;
????????}
????};
????function stopMethod() {e_stop(this);}
????// Ensure an event has a stop method.
????function addStop(event) {
????????if (!event.stop) event.stop = stopMethod;
????????return event;
????}
????function e_preventDefault(e) {
????????if (e.preventDefault) e.preventDefault();
????????else e.returnValue = false;
????}
????function e_stopPropagation(e) {
????????if (e.stopPropagation) e.stopPropagation();
????????else e.cancelBubble = true;
????}
????function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
????CodeMirror.e_stop = e_stop;
????CodeMirror.e_preventDefault = e_preventDefault;
????CodeMirror.e_stopPropagation = e_stopPropagation;
????function e_target(e) {return e.target || e.srcElement;}
????function e_button(e) {
????????if (e.which) return e.which;
????????else if (e.button & 1) return 1;
????????else if (e.button & 2) return 3;
????????else if (e.button & 4) return 2;
????}
????// Event handler registration. If disconnect is true, it'll return a
????// function that unregisters the handler.
????function connect(node, type, handler, disconnect) {
????????if (typeof node.addEventListener == "function") {
????????????node.addEventListener(type, handler, false);
????????????if (disconnect) return function() {node.removeEventListener(type, handler, false);};
????????}