-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Make sure we check to profile shortcuts with an index >9 #7344
Make sure we check to profile shortcuts with an index >9 #7344
Conversation
// add the keyboard shortcuts based on the number of profiles defined | ||
if (profileIndex < profileCount) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// add the keyboard shortcuts based on the number of profiles defined | |
if (profileIndex < profileCount) |
Since we're in a loop from 0 to profileCount, we're just guaranteed that this is true. We can simplify this code by removing the check. If you want, you can keep the {}
for this block to keep it logically separated from the rest of the code, however.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok sure, make sense. I've removed that condition in the loop and updated the indentation.
d42a783
to
21de7aa
Compare
1. Remove unnessary conditional check in loop. 2. Update indentation and code comments.
This is lovely. Thanks! |
🎉 Handy links: |
🎉 Handy links: |
Summary of the Pull Request
Update profile shortcut based on profiles defined.
PR Checklist
Validation Steps Performed
Added more profiles and able to create new tab.
Note: This binding doesn't work tho
{ "command": { "action": "newTab", "index": 10 }, "keys": "ctrl+shift+0" }