375
376
if (searchData.regex.multiline) {
377
>
return this._doFindPreviousMatchMultiline(model, searchStart, searcher, captureMatches);
textModelSearch.ts
378
>
}
379
return this._doFindPreviousMatchLineByLine(model, searchStart, searcher, captureMatches);
380
}
381
382
private static _doFindPreviousMatchMultiline(model: TextModel, searchStart: Position, searcher: Searcher, captureMatches: boolean): FindMatch | null {
383
>
const matches = this._doFindMatchesMultiline(model, new Range(1, 1, searchStart.lineNumber, searchStart.column), searcher, captureMatches, 10 * LIMIT_FIND_COUNT);
textModelSearch.ts
384
>
if (matches.length > 0) {
385
>
return matches[matches.length - 1];
386
>
}
387
388
const lineCount = model.getLineCount();
389
>
if (searchStart.lineNumber !== lineCount || searchStart.column !== model.getLineMaxColumn(lineCount)) {
textModelSearch.ts
390
// Try again with all content
391
return this._doFindPreviousMatchMultiline(model, new Position(lineCount, model.getLineMaxColumn(lineCount)), searcher, captureMatches);