Skip to content

Commit 7fdddf2

Browse files
authored
Fix bugs with code analysis status icons with multi-root (#8967)
* Fix incorrect "Running clang-tidy" status with multi-root.
1 parent 03c9918 commit 7fdddf2

File tree

1 file changed

+9
-0
lines changed
  • Extension/src/LanguageServer

1 file changed

+9
-0
lines changed

Extension/src/LanguageServer/ui.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ export class UI {
122122
}
123123

124124
private setIsCodeAnalysisPaused(val: boolean): void {
125+
if (!this.isRunningCodeAnalysis) {
126+
return;
127+
}
125128
this.isCodeAnalysisPaused = val;
126129
const twoStatus: boolean = val && this.isUpdatingIntelliSense;
127130
this.intelliSenseStatusBarItem.tooltip = (this.isUpdatingIntelliSense ? this.updatingIntelliSenseTooltip : "")
@@ -174,6 +177,9 @@ export class UI {
174177
}
175178

176179
private setCodeAnalysisProcessed(processed: number): void {
180+
if (!this.isRunningCodeAnalysis) {
181+
return; // Occurs when a multi-root workspace is activated.
182+
}
177183
this.codeAnalysisProcessed = processed;
178184
if (this.codeAnalysisProcessed > this.codeAnalysisTotal) {
179185
this.codeAnalysisTotal = this.codeAnalysisProcessed + 1;
@@ -182,6 +188,9 @@ export class UI {
182188
}
183189

184190
private setCodeAnalysisTotal(total: number): void {
191+
if (!this.isRunningCodeAnalysis) {
192+
return; // Occurs when a multi-root workspace is activated.
193+
}
185194
this.codeAnalysisTotal = total;
186195
this.updateCodeAnalysisTooltip();
187196
}

0 commit comments

Comments
 (0)