mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
Show next/previous commenting range in command palette (#193782)
This commit is contained in:
@@ -85,6 +85,15 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||||||
weight: KeybindingWeight.EditorContrib
|
weight: KeybindingWeight.EditorContrib
|
||||||
});
|
});
|
||||||
|
|
||||||
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
||||||
|
command: {
|
||||||
|
id: CommentCommandId.NextRange,
|
||||||
|
title: nls.localize('comments.nextCommentingRange', "Go to Next Commenting Range"),
|
||||||
|
category: 'Comments',
|
||||||
|
},
|
||||||
|
when: CommentContextKeys.activeEditorHasCommentingRange
|
||||||
|
});
|
||||||
|
|
||||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||||
id: CommentCommandId.PreviousRange,
|
id: CommentCommandId.PreviousRange,
|
||||||
handler: async (accessor, args?: { range: IRange; fileComment: boolean }) => {
|
handler: async (accessor, args?: { range: IRange; fileComment: boolean }) => {
|
||||||
@@ -104,6 +113,15 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||||||
weight: KeybindingWeight.EditorContrib
|
weight: KeybindingWeight.EditorContrib
|
||||||
});
|
});
|
||||||
|
|
||||||
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
||||||
|
command: {
|
||||||
|
id: CommentCommandId.PreviousRange,
|
||||||
|
title: nls.localize('comments.previousCommentingRange', "Go to Previous Commenting Range"),
|
||||||
|
category: 'Comments',
|
||||||
|
},
|
||||||
|
when: CommentContextKeys.activeEditorHasCommentingRange
|
||||||
|
});
|
||||||
|
|
||||||
CommandsRegistry.registerCommand({
|
CommandsRegistry.registerCommand({
|
||||||
id: CommentCommandId.ToggleCommenting,
|
id: CommentCommandId.ToggleCommenting,
|
||||||
handler: (accessor) => {
|
handler: (accessor) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user