-
Notifications
You must be signed in to change notification settings - Fork 219
Conversation
Conflicts: lib/buffer-search.coffee
|
I believe this is ready for review now - /cc @atom/feedback. |
| describe "when the search string is too large", -> | ||
| beforeEach -> | ||
| largeText = "abcdefghijklmnopqrstuvwxyz" | ||
| largeText += "abcdefghijklmnopqrstuvwxyz" for num in [0...2000] |
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.
Is there a better way to populate the find box with an absolutely massive search string? I believe when I first investigated this through trial and error the max regex length was 32768 (this method gives around 50000 characters just to be safe).
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.
In the past, we've created a spec/fixtures folder and stored files there for large quantities of text. This way you can create a test file and just read from it without having to do stuff like this in the test.
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.
I think if the goal is just to create a long string, you should just do "x".repeat(50000).
This was accidentally added back in during the merge conflict I think...it was removed in #583
|
Dope. Thanks @50Wliu! |


This will catch
RegExp too bigerrors and properly display them in the find box instead of a) displaying a uncaught exception, b) breaking tab switching, and c) (sometimes) preventing the find box from being usable.TODO:
RegExp too bigshould suffice) - changed to "Search string is too large"Fixes #510
Fixes #532