You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
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
The reason will be displayed to describe this comment to others. Learn more.
@jacksonweekes I think we can simply change the logic to this.numMatches > SearchModel.MAX_TOTAL_RESULTS so that it matches to the error message we're showing.
peterflynn
changed the title
Issue #8557
Issue #8557 ("Over 100000 matches" when there are exactly 100000 matches)
Oct 1, 2014
@RaymondLim That was my first thought(and I tried it) however it doesn't work for a couple of reasons. As I understand it(this is my first foray into Brackets and open source) FindInFiles.js passes the results to SearchModel.js, however FindInFiles only finds results up to MAX_TOTAL_RESULTS, which means that without the changes I have added to FindInFiles the condition this.numMatches > SearchModel.MAX_TOTAL_RESULTS never evaluates to true. With my changed FindInFiles it now returns up to MAX_TOTAL_RESULTS+1 which allows SearchModel to evaluate if there are additional results over MAX_TOTAL_RESULTS.
I have added the var excessMatches rather than using foundMaximum as foundMaximum can evaluate to true without there being excess matches. If I made the change you suggested then foundMaximum would only evaluate true if there were actually excess matches. As foundMaximum is tested elsewhere this may have unintended consequences.
The reason will be displayed to describe this comment to others. Learn more.
@jacksonweekes You can restore this line to this.numMatches--; since if you use Brackets folder (one level up from "src" folder) as your project root, then you won't get JSLint error on this line. We used to have /*jslint plusplus: true */ comment in most of the brackets source file, but files added lately no longer using it. Instead, .brackets.json file in Brackets folder has all the jslint options defined.
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.
Solves issue raised in #8557. Code passes all unit tests, and correctly shows results found below, at or above SearchModel.MAX_TOTAL_RESULTS.