File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/vs/workbench/contrib/codeEditor/browser/accessibility Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -46,24 +46,26 @@ export class AccessibilityHelpController extends Disposable implements IEditorCo
46
46
}
47
47
48
48
private _editor : ICodeEditor ;
49
- private _widget : AccessibilityHelpWidget ;
49
+ private _widget ? : AccessibilityHelpWidget ;
50
50
51
51
constructor (
52
52
editor : ICodeEditor ,
53
- @IInstantiationService instantiationService : IInstantiationService
53
+ @IInstantiationService private readonly instantiationService : IInstantiationService
54
54
) {
55
55
super ( ) ;
56
56
57
57
this . _editor = editor ;
58
- this . _widget = this . _register ( instantiationService . createInstance ( AccessibilityHelpWidget , this . _editor ) ) ;
59
58
}
60
59
61
60
public show ( ) : void {
61
+ if ( ! this . _widget ) {
62
+ this . _widget = this . _register ( this . instantiationService . createInstance ( AccessibilityHelpWidget , this . _editor ) ) ;
63
+ }
62
64
this . _widget . show ( ) ;
63
65
}
64
66
65
67
public hide ( ) : void {
66
- this . _widget . hide ( ) ;
68
+ this . _widget ? .hide ( ) ;
67
69
}
68
70
}
69
71
You can’t perform that action at this time.
0 commit comments