@@ -46,7 +46,6 @@ export class ViewModel extends EventEmitter implements editorCommon.IViewModel {
4646 private lines :ILinesCollection ;
4747 private decorations :ViewModelDecorations ;
4848 private cursors :ViewModelCursors ;
49- private shouldForceTokenization :boolean ;
5049
5150 private getCurrentCenteredModelRange :( ) => editorCommon . IEditorRange ;
5251
@@ -71,7 +70,6 @@ export class ViewModel extends EventEmitter implements editorCommon.IViewModel {
7170 this . decorations . reset ( this . model ) ;
7271
7372 this . cursors = new ViewModelCursors ( this . configuration , this ) ;
74- this . _updateShouldForceTokenization ( ) ;
7573
7674 this . listenersToRemove = [ ] ;
7775 this . _toDispose = [ ] ;
@@ -88,7 +86,6 @@ export class ViewModel extends EventEmitter implements editorCommon.IViewModel {
8886 this . emit ( editorCommon . ViewEventNames . LineMappingChangedEvent ) ;
8987 this . decorations . onLineMappingChanged ( ( eventType :string , payload :any ) => this . emit ( eventType , payload ) ) ;
9088 this . cursors . onLineMappingChanged ( ( eventType :string , payload :any ) => this . emit ( eventType , payload ) ) ;
91- this . _updateShouldForceTokenization ( ) ;
9289 }
9390 } ) ;
9491 }
@@ -111,17 +108,12 @@ export class ViewModel extends EventEmitter implements editorCommon.IViewModel {
111108 this . model = null ;
112109 }
113110
114- private _updateShouldForceTokenization ( ) : void {
115- this . shouldForceTokenization = ( this . lines . getOutputLineCount ( ) <= this . configuration . editor . forcedTokenizationBoundary ) ;
116- }
117-
118111 private _onTabSizeChange ( newTabSize :number ) : boolean {
119112 var lineMappingChanged = this . lines . setTabSize ( newTabSize , ( eventType :string , payload :any ) => this . emit ( eventType , payload ) ) ;
120113 if ( lineMappingChanged ) {
121114 this . emit ( editorCommon . ViewEventNames . LineMappingChangedEvent ) ;
122115 this . decorations . onLineMappingChanged ( ( eventType :string , payload :any ) => this . emit ( eventType , payload ) ) ;
123116 this . cursors . onLineMappingChanged ( ( eventType : string , payload : any ) => this . emit ( eventType , payload ) ) ;
124- this . _updateShouldForceTokenization ( ) ;
125117 }
126118 return lineMappingChanged ;
127119 }
@@ -132,7 +124,6 @@ export class ViewModel extends EventEmitter implements editorCommon.IViewModel {
132124 this . emit ( editorCommon . ViewEventNames . LineMappingChangedEvent ) ;
133125 this . decorations . onLineMappingChanged ( ( eventType :string , payload :any ) => this . emit ( eventType , payload ) ) ;
134126 this . cursors . onLineMappingChanged ( ( eventType : string , payload : any ) => this . emit ( eventType , payload ) ) ;
135- this . _updateShouldForceTokenization ( ) ;
136127 }
137128 return lineMappingChanged ;
138129 }
@@ -156,7 +147,6 @@ export class ViewModel extends EventEmitter implements editorCommon.IViewModel {
156147 this . emit ( editorCommon . ViewEventNames . LineMappingChangedEvent ) ;
157148 this . decorations . onLineMappingChanged ( ( eventType :string , payload :any ) => this . emit ( eventType , payload ) ) ;
158149 this . cursors . onLineMappingChanged ( ( eventType : string , payload : any ) => this . emit ( eventType , payload ) ) ;
159- this . _updateShouldForceTokenization ( ) ;
160150 }
161151 return lineMappingChanged ;
162152 }
@@ -179,7 +169,6 @@ export class ViewModel extends EventEmitter implements editorCommon.IViewModel {
179169 len :number ,
180170 e : IEmitterEvent ,
181171 data :any ,
182- shouldUpdateForceTokenization = false ,
183172 modelContentChangedEvent :editorCommon . IModelContentChangedEvent ,
184173 hadOtherModelChange = false ,
185174 hadModelLineChangeThatChangedLineMapping = false ,
@@ -218,7 +207,6 @@ export class ViewModel extends EventEmitter implements editorCommon.IViewModel {
218207 console . info ( 'ViewModel received unknown event: ' ) ;
219208 console . info ( e ) ;
220209 }
221- shouldUpdateForceTokenization = true ;
222210 break ;
223211
224212 case editorCommon . EventType . ModelTokensChanged :
@@ -292,15 +280,10 @@ export class ViewModel extends EventEmitter implements editorCommon.IViewModel {
292280 }
293281 }
294282
295- if ( shouldUpdateForceTokenization ) {
296- this . _updateShouldForceTokenization ( ) ;
297- }
298-
299283 if ( ! hadOtherModelChange && hadModelLineChangeThatChangedLineMapping ) {
300284 this . emit ( editorCommon . ViewEventNames . LineMappingChangedEvent ) ;
301285 this . decorations . onLineMappingChanged ( ( eventType :string , payload :any ) => this . emit ( eventType , payload ) ) ;
302286 this . cursors . onLineMappingChanged ( ( eventType : string , payload : any ) => this . emit ( eventType , payload ) ) ;
303- this . _updateShouldForceTokenization ( ) ;
304287 }
305288
306289 if ( revealPreviousCenteredModelRange && previousCenteredModelRange ) {
@@ -428,7 +411,7 @@ export class ViewModel extends EventEmitter implements editorCommon.IViewModel {
428411 }
429412
430413 public getLineTokens ( lineNumber :number ) : editorCommon . IViewLineTokens {
431- return this . lines . getOutputLineTokens ( lineNumber , ! this . shouldForceTokenization ) ;
414+ return this . lines . getOutputLineTokens ( lineNumber , true ) ;
432415 }
433416
434417 public getLineRenderLineNumber ( viewLineNumber :number ) : string {
0 commit comments