-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encapsulate dispatching ShortcutActions
in it's own class
#3658
Merged
Conversation
This file contains 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
zadjii-msft
added
Product-Terminal
The new Windows Terminal.
Area-CodeHealth
Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
labels
Nov 21, 2019
zadjii-msft
requested review from
carlos-zamora,
DHowett-MSFT,
miniksa and
leonMSFT
November 21, 2019 19:58
miniksa
reviewed
Nov 22, 2019
…-SAD # Conflicts: # src/cascadia/TerminalApp/AppKeyBindings.cpp # src/cascadia/TerminalApp/AppKeyBindings.h # src/cascadia/TerminalApp/AppKeyBindings.idl # src/cascadia/TerminalApp/TerminalPage.cpp
4 tasks
carlos-zamora
approved these changes
Nov 27, 2019
DHowett-MSFT
approved these changes
Nov 27, 2019
zadjii-msft
added a commit
that referenced
this pull request
Nov 28, 2019
## Summary of the Pull Request We already have "splitHorizontal" and "splitVertical", but those will both be deprecated in favor of "splitPane" with arguments. Currently, there's one argument: "style", which is one of "vertical" or "horizontal." ## References This is being done in pursuit of supporting #607 and #998. I don't really want to lob #998 in with this one, since both that and this are hefty enough PRs even as they are. (I have a branch for #998, but it needs this first) This will probably conflict with #3658 ## PR Checklist * [ ] Doesn't actually close anything, only enables #998 * [x] I work here * [ ] Tests added/passed - yea okay no excuses here * [x] Requires documentation to be updated ## Validation Steps Performed Added new keybindings with the args - works Tried the old keybindings without the args - still works --------------------------------------- * Add a 'splitPane' keybinding that can be used for splitting a pane either vertically or horizontally * Update documentation too * Good lord this is important * Add a test too, though I have no idea if it works * "style" -> "split" * pr comments from carlos
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-CodeHealth
Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
Product-Terminal
The new Windows Terminal.
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.
Summary of the Pull Request
Moves all the code responsible for dispatching an
ActionAndArgs
to it's own class,ShortcutActionDispatch
. Now, theAppKeyBindings
just uses the single instance of aShortcutActionDispatch
that theTerminalPage
owns to dispatch events, without the need to re-attach the event handlers every time we reload the settings.References
This is something I originally did as a part of #2046.
I need this now for #607.
It's also a part of work for #3475
PR Checklist
ShortcutAction
code from ~JSON Schema~ X-Macros #3475Detailed Description of the Pull Request / Additional comments
With this change, we'll be able to have other things dispatch
ShortcutAction
s easily, by constructing anActionAndArgs
and just passing it straight to theShortcutActionDispatch
.Validation Steps Performed
Ran the Terminal, tried out some keybindings, namely Ctrl+c for copy when there is a selection, or send
^C
when there isn't. That still works.Reloading settings also still works.