Skip to content

Commit

Permalink
Fix ports status bar entry not updating with number
Browse files Browse the repository at this point in the history
  • Loading branch information
alexr00 committed Oct 14, 2020
1 parent edd5e11 commit dd72e8d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/vs/workbench/contrib/remote/browser/remoteExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,12 @@ export class ForwardedPortsView extends Disposable implements IWorkbenchContribu
}

private updateStatusBar() {
if (!this.entryAccessor && this.remoteExplorerService.tunnelModel.forwarded.size > 0) {
this._register(this.entryAccessor = this.statusbarService.addEntry(this.entry, 'status.forwardedPorts', nls.localize('status.forwardedPorts', "Forwarded Ports"), StatusbarAlignment.LEFT, 40));
if (this.remoteExplorerService.tunnelModel.forwarded.size > 0) {
if (!this.entryAccessor) {
this._register(this.entryAccessor = this.statusbarService.addEntry(this.entry, 'status.forwardedPorts', nls.localize('status.forwardedPorts', "Forwarded Ports"), StatusbarAlignment.LEFT, 40));
} else {
this.entryAccessor.update(this.entry);
}
} else if (this.entryAccessor && this.remoteExplorerService.tunnelModel.forwarded.size === 0) {
this.entryAccessor.dispose();
this.entryAccessor = undefined;
Expand Down

0 comments on commit dd72e8d

Please sign in to comment.