Add 'Focus to terminal X' action#20862
Merged
Tyriar merged 11 commits intomicrosoft:masterfrom Feb 21, 2017
Merged
Conversation
Tyriar
requested changes
Feb 18, 2017
Member
Tyriar
left a comment
There was a problem hiding this comment.
Looks great, just a minor comment 👍
| actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusActiveTerminalAction, FocusActiveTerminalAction.ID, FocusActiveTerminalAction.LABEL), 'Terminal: Focus Active Terminal', category); | ||
| actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusNextTerminalAction, FocusNextTerminalAction.ID, FocusNextTerminalAction.LABEL), 'Terminal: Focus Next Terminal', category); | ||
| actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusPreviousTerminalAction, FocusPreviousTerminalAction.ID, FocusPreviousTerminalAction.LABEL), 'Terminal: Focus Previous Terminal', category); | ||
| for (let i = 0; i < 10; i++) { |
Member
There was a problem hiding this comment.
This should be 1 to 9, not 0 to 9
hun1ahpu
commented
Feb 18, 2017
| CopyTerminalSelectionAction.ID, | ||
| KillTerminalAction.ID, | ||
| FocusTerminalAction.ID, | ||
| FocusActiveTerminalAction.ID, |
Contributor
Author
There was a problem hiding this comment.
I wonder if all the new commands should be added here as well?
Member
There was a problem hiding this comment.
Yes they should, if not the terminal may eat the keystrokes before they reach the vscode keybinding system.
Member
|
@hun1ahpu tests are failing on Travis: Maybe make it a regular static function instead of an variable storing an inline function? Also changing it to |
Tyriar
reviewed
Feb 21, 2017
| } | ||
|
|
||
| public static getLabel(n: number): string { | ||
| return nls.localize(`workbench.action.terminal.focusByNumber${n}`, `Focus Terminal ${n}`, n); |
Member
There was a problem hiding this comment.
Almost there 😃 I think this should be:
return nls.localize('workbench.action.terminal.focusByNumber', 'Focus Terminal {0}', n);That way our localization system will understand it.
Tyriar
approved these changes
Feb 21, 2017
Member
|
Thanks @hun1ahpu! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20133