@@ -49,9 +49,16 @@ export type ExtStore = {
4949 } ;
5050 fileWatcher : {
5151 enabled : boolean ;
52+ statusBarFixed ?: StatusBarData | undefined ;
5253 } ;
5354} ;
5455
56+ export type StatusBarData = {
57+ text : string ;
58+ tooltip ?: string ;
59+ command ?: string | ( ( ext : Ext ) => void ) ;
60+ } ;
61+
5562export class Ext <
5663 T extends { analyse : ExtCommand ; showOutput : ExtCommand } = {
5764 analyse : ExtCommand ;
@@ -157,11 +164,7 @@ export class Ext<
157164 } ;
158165 }
159166
160- setStatusBar ( data : {
161- text : string ;
162- tooltip ?: string ;
163- command ?: string | ( ( ext : Ext ) => void ) ;
164- } ) {
167+ setStatusBar ( data : StatusBarData ) {
165168 this . statusBarItem . text = data . text ;
166169 this . statusBarItem . tooltip =
167170 typeof data . tooltip === "string" ? data . tooltip : undefined ;
@@ -176,10 +179,14 @@ export class Ext<
176179 }
177180
178181 clearStatusBar ( ) {
179- this . statusBarItem . text = "" ;
180- this . statusBarItem . tooltip = undefined ;
181- this . statusBarItem . command = undefined ;
182- this . statusBarItem . hide ( ) ;
182+ if ( this . store . fileWatcher . statusBarFixed ) {
183+ this . setStatusBar ( this . store . fileWatcher . statusBarFixed ) ;
184+ } else {
185+ this . statusBarItem . text = "" ;
186+ this . statusBarItem . tooltip = undefined ;
187+ this . statusBarItem . command = undefined ;
188+ this . statusBarItem . hide ( ) ;
189+ }
183190 }
184191
185192 setStatusBarError ( error : unknown , source : string ) {
0 commit comments