File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
src/vs/workbench/contrib/testing/browser Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -356,19 +356,25 @@ export class TestingDecorations extends Disposable implements IEditorContributio
356
356
}
357
357
}
358
358
} ) ) ;
359
- this . _register ( this . editor . onDidChangeModelContent ( e => {
359
+ this . _register ( Event . accumulate ( this . editor . onDidChangeModelContent , 0 , this . _store ) ( evts => {
360
360
const model = editor . getModel ( ) ;
361
361
if ( ! this . currentUri || ! model ) {
362
362
return ;
363
363
}
364
364
365
365
const currentDecorations = decorations . syncDecorations ( this . currentUri ) ;
366
- for ( const change of e . changes ) {
367
- const modelDecorations = model . getLinesDecorations ( change . range . startLineNumber , change . range . endLineNumber ) ;
368
- for ( const { id } of modelDecorations ) {
369
- const decoration = currentDecorations . get ( id ) ;
370
- if ( decoration instanceof TestMessageDecoration ) {
371
- decorations . invalidateResultMessage ( decoration . testMessage ) ;
366
+ if ( ! currentDecorations . size ) {
367
+ return ;
368
+ }
369
+
370
+ for ( const e of evts ) {
371
+ for ( const change of e . changes ) {
372
+ const modelDecorations = model . getLinesDecorations ( change . range . startLineNumber , change . range . endLineNumber ) ;
373
+ for ( const { id } of modelDecorations ) {
374
+ const decoration = currentDecorations . get ( id ) ;
375
+ if ( decoration instanceof TestMessageDecoration ) {
376
+ decorations . invalidateResultMessage ( decoration . testMessage ) ;
377
+ }
372
378
}
373
379
}
374
380
}
You can’t perform that action at this time.
0 commit comments