File tree Expand file tree Collapse file tree
src/vs/workbench/api/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,7 +196,39 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
196196 return false ;
197197 }
198198
199+ private _isDeltaEmpty ( delta : INotebookDocumentsAndEditorsDelta ) {
200+ if ( delta . addedDocuments !== undefined && delta . addedDocuments . length > 0 ) {
201+ return false ;
202+ }
203+
204+ if ( delta . removedDocuments !== undefined && delta . removedDocuments . length > 0 ) {
205+ return false ;
206+ }
207+
208+ if ( delta . addedEditors !== undefined && delta . addedEditors . length > 0 ) {
209+ return false ;
210+ }
211+
212+ if ( delta . removedEditors !== undefined && delta . removedEditors . length > 0 ) {
213+ return false ;
214+ }
215+
216+ if ( delta . visibleEditors !== undefined && delta . visibleEditors . length > 0 ) {
217+ return false ;
218+ }
219+
220+ if ( delta . newActiveEditor !== undefined ) {
221+ return false ;
222+ }
223+
224+ return true ;
225+ }
226+
199227 private _emitDelta ( delta : INotebookDocumentsAndEditorsDelta ) {
228+ if ( this . _isDeltaEmpty ( delta ) ) {
229+ return ;
230+ }
231+
200232 this . _proxy . $acceptDocumentAndEditorsDelta ( delta ) ;
201233 }
202234
You can’t perform that action at this time.
0 commit comments