diff --git a/src/vs/editor/common/modes/supports/tokenizationSupport.ts b/src/vs/editor/common/modes/supports/tokenizationSupport.ts index dc48f5564fd468f9651130e31156f144a6d5c9a1..415b6e6ae4643119b4327002a7f3027c77cb4485 100644 --- a/src/vs/editor/common/modes/supports/tokenizationSupport.ts +++ b/src/vs/editor/common/modes/supports/tokenizationSupport.ts @@ -10,6 +10,7 @@ import * as modes from 'vs/editor/common/modes'; import {LineStream} from 'vs/editor/common/modes/lineStream'; import {NullMode, NullState, nullTokenize} from 'vs/editor/common/modes/nullMode'; import {Token} from 'vs/editor/common/modes/supports'; +import {ModeTransition} from 'vs/editor/common/core/ModeTransition'; export interface ILeavingNestedModeData { /** @@ -189,10 +190,7 @@ export class TokenizationSupport implements modes.ITokenizationSupport, IDisposa myState = myState.clone(); if (prependModeTransitions.length <= 0 || prependModeTransitions[prependModeTransitions.length-1].mode !== this._mode) { // Avoid transitioning to the same mode (this can happen in case of empty embedded modes) - prependModeTransitions.push({ - startIndex: deltaOffset, - mode: this._mode - }); + prependModeTransitions.push(new ModeTransition(deltaOffset,this._mode)); } var maxPos = Math.min(stopAtOffset - deltaOffset, buffer.length);