This function is split into 2. We have `FindInFilesResults.prototype._addSearchMatches` which is almost the same as this function, but instead of directly adding the results to `searchResults`, it calls `SearchResults.prototype.addResultMatches` which is also used by Replace All.