@@ -318,7 +318,7 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor
318318 return this . viewContainersRegistry . getDefaultViewContainer ( location ) ;
319319 }
320320
321- moveViewContainerToLocation ( viewContainer : ViewContainer , location : ViewContainerLocation , requestedIndex ?: number ) : void {
321+ private doMoveViewContainerToLocation ( viewContainer : ViewContainer , location : ViewContainerLocation , requestedIndex ?: number , skipDiskWrite ?: boolean ) : void {
322322 const from = this . getViewContainerLocation ( viewContainer ) ;
323323 const to = location ;
324324 if ( from !== to ) {
@@ -333,10 +333,18 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor
333333 const views = this . getViewsByContainer ( viewContainer ) ;
334334 this . _onDidChangeLocation . fire ( { views, from, to } ) ;
335335
336- this . saveViewContainerLocationsToCache ( ) ;
336+ // Need to skip when syncing multiple container movements - vscode#148363
337+ if ( ! skipDiskWrite ) {
338+ this . saveViewContainerLocationsToCache ( ) ;
339+ }
337340 }
338341 }
339342
343+ moveViewContainerToLocation ( viewContainer : ViewContainer , location : ViewContainerLocation , requestedIndex ?: number ) : void {
344+ this . doMoveViewContainerToLocation ( viewContainer , location , requestedIndex ) ;
345+ }
346+
347+
340348 moveViewToLocation ( view : IViewDescriptor , location : ViewContainerLocation ) : void {
341349 let container = this . registerGeneratedViewContainer ( location ) ;
342350 this . moveViewsToContainer ( [ view ] , container ) ;
@@ -608,7 +616,7 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor
608616
609617 // Execute View Container Movement
610618 for ( const [ container , location ] of viewContainersToMove ) {
611- this . moveViewContainerToLocation ( container , location ) ;
619+ this . doMoveViewContainerToLocation ( container , location , undefined , true ) ;
612620 }
613621
614622 this . cachedViewContainerInfo = this . getCachedViewContainerLocations ( ) ;
0 commit comments