X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=blobdiff_plain;f=third-party%2Fcodemirror-3.15%2Faddon%2Fmode%2Foverlay.js;fp=third-party%2Fcodemirror-3.15%2Faddon%2Fmode%2Foverlay.js;h=0000000000000000000000000000000000000000;hp=b7928a7bbf38bc5caf89dd4e7d7121425b9ae650;hb=31540dd504798e0aca69e10d8144fbedc5b16af8;hpb=937653fd70bbf7d95bcf870e7f2b46b4a8fec486 diff --git a/third-party/codemirror-3.15/addon/mode/overlay.js b/third-party/codemirror-3.15/addon/mode/overlay.js deleted file mode 100644 index b7928a7b..00000000 --- a/third-party/codemirror-3.15/addon/mode/overlay.js +++ /dev/null @@ -1,59 +0,0 @@ -// Utility function that allows modes to be combined. The mode given -// as the base argument takes care of most of the normal mode -// functionality, but a second (typically simple) mode is used, which -// can override the style of text. Both modes get to parse all of the -// text, but when both assign a non-null style to a piece of code, the -// overlay wins, unless the combine argument was true, in which case -// the styles are combined. - -// overlayParser is the old, deprecated name -CodeMirror.overlayMode = CodeMirror.overlayParser = function(base, overlay, combine) { - return { - startState: function() { - return { - base: CodeMirror.startState(base), - overlay: CodeMirror.startState(overlay), - basePos: 0, baseCur: null, - overlayPos: 0, overlayCur: null - }; - }, - copyState: function(state) { - return { - base: CodeMirror.copyState(base, state.base), - overlay: CodeMirror.copyState(overlay, state.overlay), - basePos: state.basePos, baseCur: null, - overlayPos: state.overlayPos, overlayCur: null - }; - }, - - token: function(stream, state) { - if (stream.start == state.basePos) { - state.baseCur = base.token(stream, state.base); - state.basePos = stream.pos; - } - if (stream.start == state.overlayPos) { - stream.pos = stream.start; - state.overlayCur = overlay.token(stream, state.overlay); - state.overlayPos = stream.pos; - } - stream.pos = Math.min(state.basePos, state.overlayPos); - if (stream.eol()) state.basePos = state.overlayPos = 0; - - if (state.overlayCur == null) return state.baseCur; - if (state.baseCur != null && combine) return state.baseCur + " " + state.overlayCur; - else return state.overlayCur; - }, - - indent: base.indent && function(state, textAfter) { - return base.indent(state.base, textAfter); - }, - electricChars: base.electricChars, - - innerMode: function(state) { return {state: state.base, mode: base}; }, - - blankLine: function(state) { - if (base.blankLine) base.blankLine(state.base); - if (overlay.blankLine) overlay.blankLine(state.overlay); - } - }; -};