Add key navigation between index and workdir files#921
Merged
lucasderraugh merged 2 commits intoMay 26, 2023
Conversation
Navigate to index files controller when Down button pressed while on the last file of the workdir list Navigate to workdir files controller when Up button pressed while on the first files of the index list
Contributor
Author
|
Would like to discuss a possibility to add arrow navigation between individual lines in the diff view. |
Collaborator
|
Thanks for writing this up. I'll take some time tonight or tomorrow to review what's being changed here. |
lucasderraugh
requested changes
Apr 15, 2023
Collaborator
lucasderraugh
left a comment
There was a problem hiding this comment.
Apologies for the delay in reviewing this. Looks good to me and welcome functionality.
Small nits just to change the type to match the modifierFlags property.
I was also thinking if there was an easier way to just say there were no modifiers, but I guess it includes caps lock and things like that, so this looks appropriate.
Other than that, it's ready to merge.
| kGIKeyCode_Delete = 0x33 | ||
| }; | ||
|
|
||
| static const long kGIKeyModifiersAll = NSEventModifierFlagShift | NSEventModifierFlagControl | NSEventModifierFlagCommand | NSEventModifierFlagOption; |
Collaborator
There was a problem hiding this comment.
Suggested change
| static const long kGIKeyModifiersAll = NSEventModifierFlagShift | NSEventModifierFlagControl | NSEventModifierFlagCommand | NSEventModifierFlagOption; | |
| static const NSEventModifierFlags kGIKeyModifiersAll = NSEventModifierFlagShift | NSEventModifierFlagControl | NSEventModifierFlagCommand | NSEventModifierFlagOption; |
Use more precise type for long flags
lucasderraugh
approved these changes
May 26, 2023
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Navigate to index files controller when Down button pressed while on the last file of the workdir list
Navigate to workdir files controller when Up button pressed while on the first files of the index list
Context: I'm using keyboard navigation for most of the actions in GitUp but there were no way to quickly navigate b/w staged and un-staged files, and while it's possible with Tab/Shift+Tab it breaks natural up/down navigation that's available in simple mode. This change adds that ability to standard mode as well.
Testing and considerations:
Arrow up & Arrow down to select a different filewhich is still true