提交 1865ad05 编写于 作者: B Benjamin Pasero

swap alias and label

上级 696ae41f
......@@ -781,8 +781,8 @@ class ChangeIndentationAction extends Action {
].map((a: EditorAction) => {
return {
id: a.id,
label: (language === LANGUAGE_DEFAULT) ? a.label : a.getAlias(),
detail: (language === LANGUAGE_DEFAULT) ? null : a.label,
label: a.label,
detail: (language === LANGUAGE_DEFAULT) ? null : a.getAlias(),
run: () => a.run()
};
});
......@@ -876,8 +876,8 @@ export class ChangeEncodingAction extends Action {
saveWithEncodingPick = { label: nls.localize('saveWithEncoding', "Save with Encoding") };
reopenWithEncodingPick = { label: nls.localize('reopenWithEncoding', "Reopen with Encoding") };
} else {
saveWithEncodingPick = { label: 'Save with Encoding', detail: nls.localize('saveWithEncoding', "Save with Encoding"), };
reopenWithEncodingPick = { label: 'Reopen with Encoding', detail: nls.localize('reopenWithEncoding', "Reopen with Encoding") };
saveWithEncodingPick = { label: nls.localize('saveWithEncoding', "Save with Encoding"), detail: 'Save with Encoding', };
reopenWithEncodingPick = { label: nls.localize('reopenWithEncoding', "Reopen with Encoding"), detail: 'Reopen with Encoding' };
}
if (encodingSupport instanceof UntitledEditorInput) {
......
......@@ -287,10 +287,6 @@ export class CommandsHandler extends QuickOpenHandler {
// Alias for non default languages
let alias = (language !== LANGUAGE_DEFAULT) ? registry.getAlias(actionDescriptor.id) : null;
if (alias) {
[label, alias] = [alias, label]; // swap alias and label so that english alias is #1
}
let labelHighlights = wordFilter(searchValue, label);
let aliasHighlights = alias ? wordFilter(searchValue, alias) : null;
if (labelHighlights || aliasHighlights) {
......@@ -322,10 +318,6 @@ export class CommandsHandler extends QuickOpenHandler {
// Alias for non default languages
let alias = (language !== LANGUAGE_DEFAULT) ? action.getAlias() : null;
if (alias) {
[label, alias] = [alias, label]; // swap alias and label so that english alias is #1
}
let labelHighlights = wordFilter(searchValue, label);
let aliasHighlights = alias ? wordFilter(searchValue, alias) : null;
if (labelHighlights || aliasHighlights) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册