提交 0424ae8f 编写于 作者: J Joao Moreno

Merge remote-tracking branch 'origin/master'

......@@ -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.maxSuggestionsToShow': {
'editor.suggest.maxVisibileSuggestions': {
type: 'number',
default: EDITOR_DEFAULTS.contribInfo.suggest.maxSuggestionsToShow,
default: EDITOR_DEFAULTS.contribInfo.suggest.maxVisibileSuggestions,
minimum: 1,
maximum: 12,
description: nls.localize('suggest.maxSuggestionsToShow', "Controls how many suggestions to show in suggestions.")
description: nls.localize('suggest.maxVisibileSuggestions', "Controls how many suggestions IntelliSense will show before showing a scrollbar.")
},
'editor.selectionHighlight': {
'type': 'boolean',
......
......@@ -926,7 +926,7 @@ export interface InternalSuggestOptions {
readonly localityBonus: boolean;
readonly shareSuggestSelections: boolean;
readonly showIcons: boolean;
readonly maxSuggestionsToShow: number;
readonly maxVisibileSuggestions: number;
}
export interface InternalParameterHintOptions {
......@@ -1379,7 +1379,7 @@ export class InternalEditorOptions {
&& a.localityBonus === b.localityBonus
&& a.shareSuggestSelections === b.shareSuggestSelections
&& a.showIcons === b.showIcons
&& a.maxSuggestionsToShow === b.maxSuggestionsToShow;
&& a.maxVisibileSuggestions === b.maxVisibileSuggestions;
}
}
......@@ -1913,7 +1913,7 @@ export class EditorOptionsValidator {
localityBonus: _boolean(suggestOpts.localityBonus, defaults.localityBonus),
shareSuggestSelections: _boolean(suggestOpts.shareSuggestSelections, defaults.shareSuggestSelections),
showIcons: _boolean(suggestOpts.showIcons, defaults.showIcons),
maxSuggestionsToShow: _clampedInt(suggestOpts.maxSuggestionsToShow, defaults.maxSuggestionsToShow, 1, 12)
maxVisibileSuggestions: _clampedInt(suggestOpts.maxSuggestionsToShow, defaults.maxVisibileSuggestions, 1, 12)
};
}
......@@ -2672,7 +2672,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
localityBonus: false,
shareSuggestSelections: false,
showIcons: true,
maxSuggestionsToShow: 12
maxVisibileSuggestions: 12
},
selectionHighlight: true,
occurrencesHighlight: true,
......
......@@ -106,13 +106,15 @@ export function getDocumentFormattingEdits(
"formatterInfo" : {
"type" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"language" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
"count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
"extensions" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
telemetryService.publicLog('formatterInfo', {
type: 'document',
language: model.getLanguageIdentifier().language,
count: docFormattingProviders.length,
extensions: docFormattingProviders.map(p => p.extensionId ? ExtensionIdentifier.toKey(p.extensionId) : 'unknown')
});
if (docFormattingProviders.length > 0) {
......@@ -144,13 +146,15 @@ export function getOnTypeFormattingEdits(
"formatterInfo" : {
"type" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"language" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
"count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
"extensions" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
telemetryService.publicLog('formatterInfo', {
type: 'ontype',
language: model.getLanguageIdentifier().language,
count: providers.length,
extensions: providers.map(p => p.extensionId ? ExtensionIdentifier.toKey(p.extensionId) : 'unknown')
});
if (providers.length === 0) {
......
......@@ -1037,8 +1037,8 @@ export class SuggestWidget implements IContentWidget, IListVirtualDelegate<Compl
height = this.unfocusedHeight;
} else {
const suggestionCount = this.list.contentHeight / this.unfocusedHeight;
const maxSuggestionsToShow = this.editor.getConfiguration().contribInfo.suggest.maxSuggestionsToShow;
height = Math.min(suggestionCount, maxSuggestionsToShow) * this.unfocusedHeight;
const { maxVisibileSuggestions } = this.editor.getConfiguration().contribInfo.suggest;
height = Math.min(suggestionCount, maxVisibileSuggestions) * 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.maxSuggestionsToShow;
return this.unfocusedHeight * this.editor.getConfiguration().contribInfo.suggest.maxVisibileSuggestions;
}
private get unfocusedHeight(): number {
......
......@@ -164,7 +164,7 @@ suite('CompletionModel', function () {
localityBonus: false,
shareSuggestSelections: false,
showIcons: true,
maxSuggestionsToShow: 12
maxVisibileSuggestions: 12
});
assert.equal(model.items.length, 2);
......@@ -191,7 +191,7 @@ suite('CompletionModel', function () {
localityBonus: false,
shareSuggestSelections: false,
showIcons: true,
maxSuggestionsToShow: 12
maxVisibileSuggestions: 12
});
assert.equal(model.items.length, 2);
......@@ -217,7 +217,7 @@ suite('CompletionModel', function () {
localityBonus: false,
shareSuggestSelections: false,
showIcons: true,
maxSuggestionsToShow: 12
maxVisibileSuggestions: 12
});
assert.equal(model.items.length, 2);
......
......@@ -3199,7 +3199,7 @@ declare namespace monaco.editor {
readonly localityBonus: boolean;
readonly shareSuggestSelections: boolean;
readonly showIcons: boolean;
readonly maxSuggestionsToShow: number;
readonly maxVisibileSuggestions: number;
}
export interface InternalParameterHintOptions {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册