Skip to content

Commit f6c307e

Browse files
committed
revert more changes
1 parent 85ddeee commit f6c307e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ export class InlineCompletionsController extends Disposable {
6161
private readonly _editorDictationInProgress = observableFromEvent(this._contextKeyService.onDidChangeContext, () => this._contextKeyService.getContext(this.editor.getDomNode()).getValue('editorDictation.inProgress') === true);
6262
private readonly _enabled = derived(this, reader => this._enabledInConfig.read(reader) && (!this._isScreenReaderEnabled.read(reader) || !this._editorDictationInProgress.read(reader)));
6363

64-
private get _isEnabled(): boolean {
65-
return this._enabled.get() && (!this._isScreenReaderEnabled.get() || !this._editorDictationInProgress.get());
66-
}
67-
6864
private readonly _fontFamily = observableFromEvent(this.editor.onDidChangeConfiguration, () => this.editor.getOption(EditorOption.inlineSuggest).fontFamily);
6965

7066
private readonly _ghostTexts = derived(this, (reader) => {
@@ -177,7 +173,7 @@ export class InlineCompletionsController extends Disposable {
177173
this._register(editor.onDidType(() => transaction(tx => {
178174
/** @description InlineCompletionsController.onDidType */
179175
this.updateObservables(tx, VersionIdChangeReason.Other);
180-
if (this._isEnabled) {
176+
if (this._enabled.get()) {
181177
this.model.get()?.trigger(tx);
182178
}
183179
})));
@@ -191,7 +187,7 @@ export class InlineCompletionsController extends Disposable {
191187
inlineSuggestCommitId,
192188
'acceptSelectedSuggestion',
193189
]);
194-
if (commands.has(e.commandId) && editor.hasTextFocus() && this._isEnabled) {
190+
if (commands.has(e.commandId) && editor.hasTextFocus() && this._enabled.get()) {
195191
transaction(tx => {
196192
/** @description onDidExecuteCommand */
197193
this.model.get()?.trigger(tx);

0 commit comments

Comments
 (0)