mirror of
https://github.com/Microsoft/vscode
synced 2024-10-13 14:57:14 +00:00
Fixes #10016: the spinning bar (progress indicator) doesn't appear anymore after a running task gets terminated
This commit is contained in:
parent
e3219411b7
commit
b5c999e33b
|
@ -504,11 +504,17 @@ class StatusBarItem implements IStatusbarItem {
|
|||
}));
|
||||
|
||||
callOnDispose.push(this.taskService.addListener2(TaskServiceEvents.Inactive, (data:TaskServiceEventData) => {
|
||||
this.activeCount--;
|
||||
if (this.activeCount === 0) {
|
||||
$(progress).hide();
|
||||
clearInterval(this.intervalToken);
|
||||
this.intervalToken = null;
|
||||
// Since the exiting of the sub process is communicated async we can't order inactive and terminate events.
|
||||
// So try to treat them accordingly.
|
||||
if (this.activeCount > 0) {
|
||||
this.activeCount--;
|
||||
if (this.activeCount === 0) {
|
||||
$(progress).hide();
|
||||
if (this.intervalToken) {
|
||||
clearInterval(this.intervalToken);
|
||||
this.intervalToken = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
|
|
Loading…
Reference in a new issue