clearTimeout when hiding, fixes #11636

This commit is contained in:
Johannes Rieken
2016-09-08 11:06:23 +02:00
parent db55c382f9
commit 9bb4de392b

View File

@@ -88,6 +88,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem {
}
public hide(): void {
clearTimeout(this._timeoutHandle);
this._visible = false;
this._proxy.$dispose(this.id);
}
@@ -97,13 +98,11 @@ export class ExtHostStatusBarEntry implements StatusBarItem {
return;
}
if (this._timeoutHandle) {
clearTimeout(this._timeoutHandle);
}
clearTimeout(this._timeoutHandle);
// Defer the update so that multiple changes to setters dont cause a redraw each
this._timeoutHandle = setTimeout(() => {
this._timeoutHandle = null;
this._timeoutHandle = undefined;
// Set to status bar
this._proxy.$setEntry(this.id, this.text, this.tooltip, this.command, this.color,