File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/search/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
2525import { overviewRulerFindMatchForeground , minimapFindMatch } from 'vs/platform/theme/common/colorRegistry' ;
2626import { themeColorFromId } from 'vs/platform/theme/common/themeService' ;
2727import { IReplaceService } from 'vs/workbench/contrib/search/common/replace' ;
28- import { editorMatchesToTextSearchResults } from 'vs/workbench/services/search/common/searchHelpers' ;
28+ import { editorMatchesToTextSearchResults , addContextToEditorMatches } from 'vs/workbench/services/search/common/searchHelpers' ;
2929import { withNullAsUndefined } from 'vs/base/common/types' ;
3030import { memoize } from 'vs/base/common/decorators' ;
3131import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
@@ -306,6 +306,11 @@ export class FileMatch extends Disposable implements IFileMatch {
306306 } ) ;
307307 } ) ;
308308
309+ this . addContext (
310+ addContextToEditorMatches ( textSearchResults , this . _model , this . parent ( ) . parent ( ) . query ! )
311+ . filter ( ( result => ! resultIsMatch ( result ) ) as ( ( a : any ) => a is ITextSearchContext ) )
312+ . map ( context => ( { ...context , lineNumber : context . lineNumber + 1 } ) ) ) ;
313+
309314 this . _onChange . fire ( modelChange ) ;
310315 this . updateHighlights ( ) ;
311316 }
You can’t perform that action at this time.
0 commit comments