Skip to content

Commit 7da3d26

Browse files
committed
suggest - avoid tokenize when quick suggest options are all on or all off
1 parent ec9acc5 commit 7da3d26

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/vs/editor/common/config/editorOptions.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1954,11 +1954,18 @@ class EditorQuickSuggestions extends BaseEditorOption<EditorOption.quickSuggesti
19541954
}
19551955
if (typeof _input === 'object') {
19561956
const input = _input as IQuickSuggestionsOptions;
1957-
return {
1957+
const opts = {
19581958
other: EditorBooleanOption.boolean(input.other, this.defaultValue.other),
19591959
comments: EditorBooleanOption.boolean(input.comments, this.defaultValue.comments),
19601960
strings: EditorBooleanOption.boolean(input.strings, this.defaultValue.strings),
19611961
};
1962+
if (opts.other && opts.comments && opts.strings) {
1963+
return true; // all on
1964+
} else if (!opts.other && !opts.comments && !opts.strings) {
1965+
return false; // all off
1966+
} else {
1967+
return opts;
1968+
}
19621969
}
19631970
return this.defaultValue;
19641971
}

0 commit comments

Comments
 (0)