Skip to content

Commit d7d5550

Browse files
Always display a text in the status bar item
Even when we don't receive any alire/project diagnostics at startup, otherwise the status bar item gets always hidden, not matter it's actual visbility set by the StatusBartItem.hide/show methods. For eng/ide/ada_language_server#1520
1 parent ea75837 commit d7d5550

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

integration/vscode/ada/src/ExtensionState.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ export class ExtensionState {
190190
* diagnostics.
191191
*/
192192
public updateStatusBarItem = () => {
193+
// Set the status bar item's default text ('Ada & SPARK')
194+
this.statusBar.text = 'Ada & SPARK';
195+
193196
// Use markdown for the status bar item tiooltip. This allows to have
194197
// hyperlinks that run actual commands.
195198
this.statusBar.tooltip = new vscode.MarkdownString('', true);
@@ -220,7 +223,6 @@ export class ExtensionState {
220223
const statusBarSeverity: vscode.DiagnosticSeverity = alsDiagnostics
221224
.map((a) => a.severity)
222225
.reduce((a, b) => (a < b ? a : b));
223-
this.statusBar.text = 'Ada & SPARK';
224226

225227
switch (statusBarSeverity) {
226228
case vscode.DiagnosticSeverity.Error:

0 commit comments

Comments
 (0)