@@ -61,10 +61,6 @@ export class InlineCompletionsController extends Disposable {
61
61
private readonly _editorDictationInProgress = observableFromEvent ( this . _contextKeyService . onDidChangeContext , ( ) => this . _contextKeyService . getContext ( this . editor . getDomNode ( ) ) . getValue ( 'editorDictation.inProgress' ) === true ) ;
62
62
private readonly _enabled = derived ( this , reader => this . _enabledInConfig . read ( reader ) && ( ! this . _isScreenReaderEnabled . read ( reader ) || ! this . _editorDictationInProgress . read ( reader ) ) ) ;
63
63
64
- private get _isEnabled ( ) : boolean {
65
- return this . _enabled . get ( ) && ( ! this . _isScreenReaderEnabled . get ( ) || ! this . _editorDictationInProgress . get ( ) ) ;
66
- }
67
-
68
64
private readonly _fontFamily = observableFromEvent ( this . editor . onDidChangeConfiguration , ( ) => this . editor . getOption ( EditorOption . inlineSuggest ) . fontFamily ) ;
69
65
70
66
private readonly _ghostTexts = derived ( this , ( reader ) => {
@@ -177,7 +173,7 @@ export class InlineCompletionsController extends Disposable {
177
173
this . _register ( editor . onDidType ( ( ) => transaction ( tx => {
178
174
/** @description InlineCompletionsController.onDidType */
179
175
this . updateObservables ( tx , VersionIdChangeReason . Other ) ;
180
- if ( this . _isEnabled ) {
176
+ if ( this . _enabled . get ( ) ) {
181
177
this . model . get ( ) ?. trigger ( tx ) ;
182
178
}
183
179
} ) ) ) ;
@@ -191,7 +187,7 @@ export class InlineCompletionsController extends Disposable {
191
187
inlineSuggestCommitId ,
192
188
'acceptSelectedSuggestion' ,
193
189
] ) ;
194
- if ( commands . has ( e . commandId ) && editor . hasTextFocus ( ) && this . _isEnabled ) {
190
+ if ( commands . has ( e . commandId ) && editor . hasTextFocus ( ) && this . _enabled . get ( ) ) {
195
191
transaction ( tx => {
196
192
/** @description onDidExecuteCommand */
197
193
this . model . get ( ) ?. trigger ( tx ) ;
0 commit comments