提交 2a5cb0d3 编写于 作者: J Johannes Rieken

fix typo #68557

上级 cd4c7997
......@@ -684,12 +684,12 @@ const editorConfiguration: IConfigurationNode = {
default: EDITOR_DEFAULTS.contribInfo.suggest.showIcons,
description: nls.localize('suggest.showIcons', "Controls whether to show or hide icons in suggestions.")
},
'editor.suggest.maxVisibileSuggestions': {
'editor.suggest.maxVisibleSuggestions': {
type: 'number',
default: EDITOR_DEFAULTS.contribInfo.suggest.maxVisibileSuggestions,
default: EDITOR_DEFAULTS.contribInfo.suggest.maxVisibleSuggestions,
minimum: 1,
maximum: 12,
description: nls.localize('suggest.maxVisibileSuggestions', "Controls how many suggestions IntelliSense will show before showing a scrollbar.")
description: nls.localize('suggest.maxVisibleSuggestions', "Controls how many suggestions IntelliSense will show before showing a scrollbar.")
},
'editor.suggest.filteredTypes': {
type: 'object',
......
......@@ -211,7 +211,7 @@ export interface ISuggestOptions {
/**
* Max suggestions to show in suggestions. Defaults to 12.
*/
maxVisibileSuggestions?: boolean;
maxVisibleSuggestions?: boolean;
/**
* Names of suggestion types to filter.
*/
......@@ -931,7 +931,7 @@ export interface InternalSuggestOptions {
readonly localityBonus: boolean;
readonly shareSuggestSelections: boolean;
readonly showIcons: boolean;
readonly maxVisibileSuggestions: number;
readonly maxVisibleSuggestions: number;
readonly filteredTypes: Record<string, boolean>;
}
......@@ -1385,7 +1385,7 @@ export class InternalEditorOptions {
&& a.localityBonus === b.localityBonus
&& a.shareSuggestSelections === b.shareSuggestSelections
&& a.showIcons === b.showIcons
&& a.maxVisibileSuggestions === b.maxVisibileSuggestions;
&& a.maxVisibleSuggestions === b.maxVisibleSuggestions;
}
}
......@@ -1919,7 +1919,7 @@ export class EditorOptionsValidator {
localityBonus: _boolean(suggestOpts.localityBonus, defaults.localityBonus),
shareSuggestSelections: _boolean(suggestOpts.shareSuggestSelections, defaults.shareSuggestSelections),
showIcons: _boolean(suggestOpts.showIcons, defaults.showIcons),
maxVisibileSuggestions: _clampedInt(suggestOpts.maxVisibileSuggestions, defaults.maxVisibileSuggestions, 1, 12),
maxVisibleSuggestions: _clampedInt(suggestOpts.maxVisibleSuggestions, defaults.maxVisibleSuggestions, 1, 12),
filteredTypes: isObject(suggestOpts.filteredTypes) ? suggestOpts.filteredTypes : Object.create(null)
};
}
......@@ -2679,7 +2679,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
localityBonus: false,
shareSuggestSelections: false,
showIcons: true,
maxVisibileSuggestions: 12,
maxVisibleSuggestions: 12,
filteredTypes: Object.create(null)
},
selectionHighlight: true,
......
......@@ -1037,8 +1037,8 @@ export class SuggestWidget implements IContentWidget, IListVirtualDelegate<Compl
height = this.unfocusedHeight;
} else {
const suggestionCount = this.list.contentHeight / this.unfocusedHeight;
const { maxVisibileSuggestions } = this.editor.getConfiguration().contribInfo.suggest;
height = Math.min(suggestionCount, maxVisibileSuggestions) * this.unfocusedHeight;
const { maxVisibleSuggestions } = this.editor.getConfiguration().contribInfo.suggest;
height = Math.min(suggestionCount, maxVisibleSuggestions) * this.unfocusedHeight;
}
this.element.style.lineHeight = `${this.unfocusedHeight}px`;
......@@ -1118,7 +1118,7 @@ export class SuggestWidget implements IContentWidget, IListVirtualDelegate<Compl
// Heights
private get maxWidgetHeight(): number {
return this.unfocusedHeight * this.editor.getConfiguration().contribInfo.suggest.maxVisibileSuggestions;
return this.unfocusedHeight * this.editor.getConfiguration().contribInfo.suggest.maxVisibleSuggestions;
}
private get unfocusedHeight(): number {
......
......@@ -164,7 +164,7 @@ suite('CompletionModel', function () {
localityBonus: false,
shareSuggestSelections: false,
showIcons: true,
maxVisibileSuggestions: 12,
maxVisibleSuggestions: 12,
filteredTypes: Object.create(null)
});
......@@ -192,7 +192,7 @@ suite('CompletionModel', function () {
localityBonus: false,
shareSuggestSelections: false,
showIcons: true,
maxVisibileSuggestions: 12,
maxVisibleSuggestions: 12,
filteredTypes: Object.create(null)
});
......@@ -219,7 +219,7 @@ suite('CompletionModel', function () {
localityBonus: false,
shareSuggestSelections: false,
showIcons: true,
maxVisibileSuggestions: 12,
maxVisibleSuggestions: 12,
filteredTypes: Object.create(null)
});
......
......@@ -2554,7 +2554,7 @@ declare namespace monaco.editor {
/**
* Max suggestions to show in suggestions. Defaults to 12.
*/
maxVisibileSuggestions?: boolean;
maxVisibleSuggestions?: boolean;
/**
* Names of suggestion types to filter.
*/
......@@ -3203,7 +3203,7 @@ declare namespace monaco.editor {
readonly localityBonus: boolean;
readonly shareSuggestSelections: boolean;
readonly showIcons: boolean;
readonly maxVisibileSuggestions: number;
readonly maxVisibleSuggestions: number;
readonly filteredTypes: Record<string, boolean>;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册