提交 ba72bf8e 编写于 作者: J Jackson Kearl

Actually fix #86497 by adding context for FileMatches with attached models

上级 672c31b1
......@@ -25,7 +25,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { overviewRulerFindMatchForeground, minimapFindMatch } from 'vs/platform/theme/common/colorRegistry';
import { themeColorFromId } from 'vs/platform/theme/common/themeService';
import { IReplaceService } from 'vs/workbench/contrib/search/common/replace';
import { editorMatchesToTextSearchResults } from 'vs/workbench/services/search/common/searchHelpers';
import { editorMatchesToTextSearchResults, addContextToEditorMatches } from 'vs/workbench/services/search/common/searchHelpers';
import { withNullAsUndefined } from 'vs/base/common/types';
import { memoize } from 'vs/base/common/decorators';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
......@@ -306,6 +306,11 @@ export class FileMatch extends Disposable implements IFileMatch {
});
});
this.addContext(
addContextToEditorMatches(textSearchResults, this._model, this.parent().parent().query!)
.filter((result => !resultIsMatch(result)) as ((a: any) => a is ITextSearchContext))
.map(context => ({ ...context, lineNumber: context.lineNumber + 1 })));
this._onChange.fire(modelChange);
this.updateHighlights();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册