提交 2677f164 编写于 作者: D Daniel Imms

Align delete word terminal actions with editor

上级 05a5ece4
......@@ -17,7 +17,7 @@ import { TERMINAL_DEFAULT_SHELL_LINUX, TERMINAL_DEFAULT_SHELL_OSX, TERMINAL_DEFA
import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction, SelectAllTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, DeleteWordBeforeCursorTerminalAction, DeleteWordAfterCursorTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions';
import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction, SelectAllTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions';
import { Registry } from 'vs/platform/registry/common/platform';
import { ShowAllCommandsAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler';
import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
......@@ -194,8 +194,8 @@ configurationRegistry.registerConfiguration({
NavigateDownAction.ID,
NavigateRightAction.ID,
NavigateLeftAction.ID,
DeleteWordBeforeCursorTerminalAction.ID,
DeleteWordAfterCursorTerminalAction.ID
DeleteWordLeftTerminalAction.ID,
DeleteWordRightTerminalAction.ID
].sort()
}
}
......@@ -293,11 +293,11 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(HideTerminalFind
primary: KeyCode.Escape,
secondary: [KeyCode.Shift | KeyCode.Escape]
}, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE)), 'Terminal: Focus Find Widget', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DeleteWordBeforeCursorTerminalAction, DeleteWordBeforeCursorTerminalAction.ID, DeleteWordBeforeCursorTerminalAction.LABEL, {
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DeleteWordLeftTerminalAction, DeleteWordLeftTerminalAction.ID, DeleteWordLeftTerminalAction.LABEL, {
primary: KeyMod.CtrlCmd | KeyCode.Backspace,
mac: { primary: KeyMod.Alt | KeyCode.Backspace }
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Delete Word Before Cursor', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DeleteWordAfterCursorTerminalAction, DeleteWordAfterCursorTerminalAction.ID, DeleteWordAfterCursorTerminalAction.LABEL, {
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DeleteWordRightTerminalAction, DeleteWordRightTerminalAction.ID, DeleteWordRightTerminalAction.LABEL, {
primary: KeyMod.CtrlCmd | KeyCode.Delete,
mac: { primary: KeyMod.Alt | KeyCode.Delete }
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Delete Word After Cursor', category);
......
......@@ -115,10 +115,10 @@ export class SelectAllTerminalAction extends Action {
}
}
export class DeleteWordBeforeCursorTerminalAction extends Action {
export class DeleteWordLeftTerminalAction extends Action {
public static ID = 'workbench.action.terminal.deleteWordBeforeCursor';
public static LABEL = nls.localize('workbench.action.terminal.deleteWordBeforeCursor', "Delete Word Before Cursor");
public static ID = 'workbench.action.terminal.deleteWordLeft';
public static LABEL = nls.localize('workbench.action.terminal.deleteWordLeft', "Delete Word Left");
constructor(
id: string, label: string,
......@@ -137,10 +137,10 @@ export class DeleteWordBeforeCursorTerminalAction extends Action {
}
}
export class DeleteWordAfterCursorTerminalAction extends Action {
export class DeleteWordRightTerminalAction extends Action {
public static ID = 'workbench.action.terminal.deleteWordAfterCursor';
public static LABEL = nls.localize('workbench.action.terminal.deleteWordAfterCursor', "Delete Word After Cursor");
public static ID = 'workbench.action.terminal.deleteWordRight';
public static LABEL = nls.localize('workbench.action.terminal.deleteWordRight', "Delete Word Right");
constructor(
id: string, label: string,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册