• 笙默考试管理系统-MyExamTest----codemirror(26)


    笙默考试管理系统-MyExamTest----codemirror(26)

    目录

    一、 笙默考试管理系统-MyExamTest----codemirror

    二、 笙默考试管理系统-MyExamTest----codemirror

    三、 笙默考试管理系统-MyExamTest----codemirror

    四、 笙默考试管理系统-MyExamTest----codemirror

    五、 笙默考试管理系统-MyExamTest----codemirror

    • 笙默考试管理系统-MyExamTest----codemirror

     return minline;

            }

            function getStateBefore(n) {

                var start = findStartLine(n), state = start && getLine(start-1).stateAfter;

                if (!state) state = startState(mode);

                else state = copyState(mode, state);

                doc.iter(start, n, function(line) {

                    line.highlight(mode, state, options.tabSize);

                    line.stateAfter = copyState(mode, state);

                });

    • 笙默考试管理系统-MyExamTest----codemirror

                if (start < n) changes.push({from: start, to: n});

                if (n < doc.size && !getLine(n).stateAfter) work.push(n);

                return state;

            }

            function highlightLines(start, end) {

                var state = getStateBefore(start);

                doc.iter(start, end, function(line) {

                    line.highlight(mode, state, options.tabSize);

                    line.stateAfter = copyState(mode, state);

                });

            }

    • 笙默考试管理系统-MyExamTest----codemirror

            function highlightWorker() {

                var end = +new Date + options.workTime;

                var foundWork = work.length;

                while (work.length) {

                    if (!getLine(showingFrom).stateAfter) var task = showingFrom;

                    else var task = work.pop();

                    if (task >= doc.size) continue;

                    var start = findStartLine(task), state = start && getLine(start-1).stateAfter;

                    if (state) state = copyState(mode, state);

                    else state = startState(mode);

    • 笙默考试管理系统-MyExamTest----codemirror

                    var unchanged = 0, compare = mode.compareStates, realChange = false,

                        i = start, bail = false;

                    doc.iter(i, doc.size, function(line) {

                        var hadState = line.stateAfter;

                        if (+new Date > end) {

                            work.push(i);

                            startWorker(options.workDelay);

                            if (realChange) changes.push({from: task, to: i + 1});

                            return (bail = true);

                        }

                        var changed = line.highlight(mode, state, options.tabSize);

                        if (changed) realChange = true;

                        line.stateAfter = copyState(mode, state);

                        if (compare) {

                            if (hadState && compare(hadState, state)) return true;

                        } else {

                            if (changed !== false || !hadState) unchanged = 0;

                            else if (++unchanged > 3 && (!mode.indent || mode.indent(hadState, "") == mode.indent(state, "")))

    • 笙默考试管理系统-MyExamTest----codemirror

                                return true;

                        }

                        ++i;

                    });

                    if (bail) return;

                    if (realChange) changes.push({from: task, to: i + 1});

                }

                if (foundWork && options.onHighlightComplete)

                    options.onHighlightComplete(instance);

            }

            function startWorker(time) {

                if (!work.length) return;

                highlight.set(time, operation(highlightWorker));

            }

            // Operations are used to wrap changes in such a way that each

            // change won't have to update the cursor and display (which would

            // be awkward, slow, and error-prone), but instead updates are

            // batched and then all combined and executed at once.

            function startOperation() {

                updateInput = userSelChange = textChanged = null;

                changes = []; selectionChanged = false; callbacks = [];

            }

  • 相关阅读:
    药品研发--原料储存管理制度
    SpringMVC 项目中 创建SpringBoot,使用Hibernate和JPA
    【深度学习】实验09 使用Keras完成线性回归
    总结 Thread 类的基本用法
    NA of optical fiber(光纤的数值孔径)
    为互连智能合约Connected Contracts使用Axelar SDK
    gitpod.io,云端开发调试工具。
    Flink 状态管理
    C++ Reference: Standard C++ Library reference: C Library: cwctype: wctype
    开源免费的Windows应用程序强力卸载工具Bulk Crap UninstallerV5.7的简单使用
  • 原文地址:https://blog.csdn.net/N201871643/article/details/132995931