-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] Added ESC, Y, A, N, and S as keyboard shortcuts to the Replace and Find ... #5456
Comments
Comment by mrplants I replaced the == with === in order to pass the Travis CI test. |
Comment by peterflynn Adding a couple drive-by comments... also |
Comment by peterflynn Also, looks like this pull request adds an empty file called "Run"... can you remove that from the diff? |
Comment by peterflynn One last point: I wondered whether the mnemonics Y/N/S/A should be localized since the buttons will have different labels in other locales. But we don't do that for any other shortcuts, and it's already covered by the shortcut localization story -- so IMHO no need to worry about it here. |
Comment by MarcelGerber
|
Comment by mrplants
|
Comment by mrplants
So the keyboard commands would be: This way, it can be language-agnostic. Let me know what you think and I'll implement it. |
Comment by MarcelGerber I realized this wasn't a good idea, too. We had to implement special cases like if two strings began with the same char.
|
Comment by mrplants Are there any other problems with this Pull Request that I should fix? |
Comment by TomMalbran Yes. Please use JSLint when coding for Brackets. If you code in Brackets just enable it to check the code. Right now there is an error with the switch, which should be |
Comment by redmunds
|
Comment by mrplants I found a JSLinter and fixed my code. Please advise for any other changes when you review the pull request again. |
Comment by redmunds
This code doesn't quite follow the existing flow of code. I can see 2 ways (so far) where this causes bugs:
Look at the code in the |
Comment by redmunds The Escape and Stop cases are doing the same thing:
So they can be consolidated:
Note that this code will likely change due to my previous comment, but these 2 cases will probably still be the same and can still be consolidated. |
Comment by redmunds Done with review. Let me know when you push fixes to your branch and I'll review again. |
Comment by redmunds Note that it's best practice to create a branch for your changes. This way you can update your master branch with brackets repo updates, etc. without affecting your pull request. This also allows you to have multiple pull requests. |
Comment by peterflynn Closing since this is going to be invalidated by the find/replace UI cleanup user story within the next day or two. I'll see if I can work the keyboard handling into that change. If not, |
Comment by mrplants
On a side note, I'm a student and I have an assignment to improve a data structure in an open source project. Do you think that Brackets has this? I'm looking for a project with the following restrictions: The improvement will increase efficiency or speed Any ideas? I realize that the assignment is kind of useless and out of scope, but if you could find something like this for me, I would really appreciate it. |
Issue by mrplants
Tuesday Nov 12, 2013 at 23:35 GMT
Originally opened as adobe/brackets#5969
Submitting fix to bug: adobe/brackets#5005. ESC, Y, A, N, and S keyboard shortcuts were added to the Replace and Find function. No deletion of code was necessary. I simply attached a handler to the 'modalBar' object that watched for key events and performed the necessary functions fi the above keyCodes were realized.
mrplants included the following code: https://github.com/adobe/brackets/pull/5969/commits
The text was updated successfully, but these errors were encountered: