Adjust regex-too-big message to prepare for native search
Refs
MODIFY
lib/buffer-search.js
lib/buffer-search.js
@@ -148,8 +148,9 @@ class BufferSearch {
newMarkers.push(this.createMarker(range));
});
} catch (error) {
+ // TODO - remove after Atom 1.25 ships.
if (/RegExp too big$/.test(error.message)) {
- error.message = "Search string is too large";
+ error.message = "regular expression is too large";
}
this.emitter.emit('did-error', error);
return false;

MODIFY
spec/find-view-spec.js
spec/find-view-spec.js
@@ -536,7 +536,7 @@ describe("FindView", () => {
it("displays the error", () => {
expect(findView.refs.descriptionLabel).toHaveClass("text-error");
- expect(findView.refs.descriptionLabel.textContent).toContain("Search string is too large");
+ expect(findView.refs.descriptionLabel.textContent).toBe("regular expression is too large");
});
it("will be reset when there is no longer an error", () => {

Adjust regex-too-big message to prepare for native search

Refs https://github.com/atom/text-buffer/pull/288