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
356356 }
357357 }
358358 } ) ) ;
359- this . _register ( this . editor . onDidChangeModelContent ( e => {
359+ this . _register ( Event . accumulate ( this . editor . onDidChangeModelContent , 0 , this . _store ) ( evts => {
360360 const model = editor . getModel ( ) ;
361361 if ( ! this . currentUri || ! model ) {
362362 return ;
363363 }
364364
365365 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+ }
372378 }
373379 }
374380 }
You can’t perform that action at this time.
0 commit comments