Skip to content

Commit

Permalink
terminal: Spawning Speed issue fix (eclipse-theia#12225)
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoAscencio authored and kenneth-marut-work committed Mar 6, 2023
1 parent a5e1162 commit 5404e35
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/toolbar/src/browser/toolbar-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,10 @@ export class ToolbarController {
newPosition: ToolbarItemPosition,
direction: 'location-left' | 'location-right',
): Promise<boolean> {
await this.openOrCreateJSONFile(false);
this.toolbarProviderBusyEmitter.fire(true);
const success = this.storageProvider.swapValues(oldPosition, newPosition, direction);
this.toolbarProviderBusyEmitter.fire(false);
return success;
return this.withBusy<boolean>(async () => {
await this.openOrCreateJSONFile(false);
return this.storageProvider.swapValues(oldPosition, newPosition, direction);
});
}

async clearAll(): Promise<boolean> {
Expand Down

0 comments on commit 5404e35

Please sign in to comment.