@@ -35,7 +35,7 @@ import { ILineBreaksComputer, ILineBreaksComputerFactory, InjectedText } from 'v
35
35
import { ViewEventHandler } from 'vs/editor/common/viewEventHandler' ;
36
36
import { ICoordinatesConverter , IViewModel , IWhitespaceChangeAccessor , MinimapLinesRenderingData , OverviewRulerDecorationsGroup , ViewLineData , ViewLineRenderingData , ViewModelDecoration } from 'vs/editor/common/viewModel' ;
37
37
import { ViewModelDecorations } from 'vs/editor/common/viewModel/viewModelDecorations' ;
38
- import { FocusChangedEvent , ModelContentChangedEvent , ModelDecorationsChangedEvent , ModelLanguageChangedEvent , ModelLanguageConfigurationChangedEvent , ModelOptionsChangedEvent , ModelTokensChangedEvent , OutgoingViewModelEvent , ReadOnlyEditAttemptEvent , ScrollChangedEvent , ViewModelEventDispatcher , ViewModelEventsCollector , ViewZonesChangedEvent } from 'vs/editor/common/viewModelEventDispatcher' ;
38
+ import { FocusChangedEvent , OutgoingViewModelEvent , ReadOnlyEditAttemptEvent , ScrollChangedEvent , ViewModelEventDispatcher , ViewModelEventsCollector , ViewZonesChangedEvent } from 'vs/editor/common/viewModelEventDispatcher' ;
39
39
import { IViewModelLines , ViewModelLinesFromModelAsIs , ViewModelLinesFromProjectedModel } from 'vs/editor/common/viewModel/viewModelLines' ;
40
40
import { IThemeService } from 'vs/platform/theme/common/themeService' ;
41
41
@@ -274,8 +274,8 @@ export class ViewModel extends Disposable implements IViewModel {
274
274
let hadOtherModelChange = false ;
275
275
let hadModelLineChangeThatChangedLineMapping = false ;
276
276
277
- const changes = ( e instanceof textModelEvents . InternalModelContentChangeEvent ? e . rawContentChangedEvent . changes : e . changes ) ;
278
- const versionId = ( e instanceof textModelEvents . InternalModelContentChangeEvent ? e . rawContentChangedEvent . versionId : null ) ;
277
+ const changes = e . changes ;
278
+ const versionId = ( e instanceof textModelEvents . ModelRawContentChangedEvent ? e . versionId : null ) ;
279
279
280
280
// Do a first pass to compute line mappings, and a second pass to actually interpret them
281
281
const lineBreaksComputer = this . _lines . createLineBreaksComputer ( ) ;
@@ -391,9 +391,6 @@ export class ViewModel extends Disposable implements IViewModel {
391
391
392
392
try {
393
393
const eventsCollector = this . _eventDispatcher . beginEmitViewEvents ( ) ;
394
- if ( e instanceof textModelEvents . InternalModelContentChangeEvent ) {
395
- eventsCollector . emitOutgoingEvent ( new ModelContentChangedEvent ( e . contentChangedEvent ) ) ;
396
- }
397
394
this . _cursor . onModelContentChanged ( eventsCollector , e ) ;
398
395
} finally {
399
396
this . _eventDispatcher . endEmitViewEvents ( ) ;
@@ -418,20 +415,17 @@ export class ViewModel extends Disposable implements IViewModel {
418
415
if ( e . tokenizationSupportChanged ) {
419
416
this . _tokenizeViewportSoon . schedule ( ) ;
420
417
}
421
- this . _eventDispatcher . emitOutgoingEvent ( new ModelTokensChangedEvent ( e ) ) ;
422
418
} ) ) ;
423
419
424
420
this . _register ( this . model . onDidChangeLanguageConfiguration ( ( e ) => {
425
421
this . _eventDispatcher . emitSingleViewEvent ( new viewEvents . ViewLanguageConfigurationEvent ( ) ) ;
426
422
this . cursorConfig = new CursorConfiguration ( this . model . getLanguageId ( ) , this . model . getOptions ( ) , this . _configuration , this . languageConfigurationService ) ;
427
423
this . _cursor . updateConfiguration ( this . cursorConfig ) ;
428
- this . _eventDispatcher . emitOutgoingEvent ( new ModelLanguageConfigurationChangedEvent ( e ) ) ;
429
424
} ) ) ;
430
425
431
426
this . _register ( this . model . onDidChangeLanguage ( ( e ) => {
432
427
this . cursorConfig = new CursorConfiguration ( this . model . getLanguageId ( ) , this . model . getOptions ( ) , this . _configuration , this . languageConfigurationService ) ;
433
428
this . _cursor . updateConfiguration ( this . cursorConfig ) ;
434
- this . _eventDispatcher . emitOutgoingEvent ( new ModelLanguageChangedEvent ( e ) ) ;
435
429
} ) ) ;
436
430
437
431
this . _register ( this . model . onDidChangeOptions ( ( e ) => {
@@ -453,14 +447,11 @@ export class ViewModel extends Disposable implements IViewModel {
453
447
454
448
this . cursorConfig = new CursorConfiguration ( this . model . getLanguageId ( ) , this . model . getOptions ( ) , this . _configuration , this . languageConfigurationService ) ;
455
449
this . _cursor . updateConfiguration ( this . cursorConfig ) ;
456
-
457
- this . _eventDispatcher . emitOutgoingEvent ( new ModelOptionsChangedEvent ( e ) ) ;
458
450
} ) ) ;
459
451
460
452
this . _register ( this . model . onDidChangeDecorations ( ( e ) => {
461
453
this . _decorations . onModelDecorationsChanged ( ) ;
462
454
this . _eventDispatcher . emitSingleViewEvent ( new viewEvents . ViewDecorationsChangedEvent ( e ) ) ;
463
- this . _eventDispatcher . emitOutgoingEvent ( new ModelDecorationsChangedEvent ( e ) ) ;
464
455
} ) ) ;
465
456
}
466
457
0 commit comments