mirror of
https://github.com/Microsoft/vscode
synced 2024-09-28 23:42:26 +00:00
Merge pull request #229570 from microsoft/andreamah/issue229466
Can NOT open Replace Preview
This commit is contained in:
commit
c45f9a3e8c
|
@ -72,7 +72,7 @@ class ReplacePreviewModel extends Disposable {
|
|||
|
||||
async resolve(replacePreviewUri: URI): Promise<ITextModel> {
|
||||
const fileResource = toFileResource(replacePreviewUri);
|
||||
const fileMatch = <FileMatch>this.searchWorkbenchService.searchModel.searchResult.matches(true).filter(match => match.resource.toString() === fileResource.toString())[0];
|
||||
const fileMatch = <FileMatch>this.searchWorkbenchService.searchModel.searchResult.matches(false).filter(match => match.resource.toString() === fileResource.toString())[0];
|
||||
const ref = this._register(await this.textModelResolverService.createModelReference(fileResource));
|
||||
const sourceModel = ref.object.textEditorModel;
|
||||
const sourceModelLanguageId = sourceModel.getLanguageId();
|
||||
|
|
Loading…
Reference in a new issue