simplify "Go to Symbol in Editor" registration, fyi @bpasero, related to https://github.com/microsoft/vscode/issues/129189

This commit is contained in:
Johannes Rieken
2021-08-26 13:06:29 +02:00
parent aeb8b4be9a
commit b0e93a987b
2 changed files with 7 additions and 10 deletions
@@ -17,7 +17,7 @@ import { ITextModel } from 'vs/editor/common/model';
import { DisposableStore, IDisposable, toDisposable, Disposable, MutableDisposable } from 'vs/base/common/lifecycle';
import { timeout } from 'vs/base/common/async';
import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation';
import { registerAction2, Action2 } from 'vs/platform/actions/common/actions';
import { registerAction2, Action2, MenuId } from 'vs/platform/actions/common/actions';
import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
import { prepareQuery } from 'vs/base/common/fuzzyScorer';
import { SymbolKind } from 'vs/editor/common/modes';
@@ -255,6 +255,7 @@ registerAction2(class GotoSymbolAction extends Action2 {
id: 'workbench.action.gotoSymbol',
title: {
value: localize('gotoSymbol', "Go to Symbol in Editor..."),
mnemonicTitle: localize({ key: 'miGotoSymbolInEditor', comment: ['&& denotes a mnemonic'] }, "Go to &&Symbol in Editor..."),
original: 'Go to Symbol in Editor...'
},
f1: true,
@@ -262,6 +263,11 @@ registerAction2(class GotoSymbolAction extends Action2 {
when: undefined,
weight: KeybindingWeight.WorkbenchContrib,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_O
},
menu: {
id: MenuId.MenubarGoMenu,
group: '4_symbol_nav',
order: 1
}
});
}
@@ -66,15 +66,6 @@ MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
order: 2
});
MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
group: '4_symbol_nav',
command: {
id: 'workbench.action.gotoSymbol',
title: localize({ key: 'miGotoSymbolInEditor', comment: ['&& denotes a mnemonic'] }, "Go to &&Symbol in Editor...")
},
order: 1
});
MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
group: '5_infile_nav',
command: {