提交 1a8f9c01 编写于 作者: S Sandeep Somavarapu

Fix #14741

上级 f3e2685f
......@@ -52,10 +52,12 @@ class EditorInputCache {
if (editorInputPromise) {
editorInputPromise.done(() => {
if (reloadFromSource) {
this.editorService.resolveEditorModel({ resource: fileMatch.resource() }).then(value => {
let replaceResource = this.getReplaceResource(fileMatch.resource());
this.modelService.getModel(replaceResource).setValue(value.textEditorModel.getValue());
this.replaceService.replace(fileMatch, null, replaceResource);
this.editorService.resolveEditorModel({ resource: fileMatch.resource() }).then(editorModel => {
if (editorModel.textEditorModel) {
let replaceResource = this.getReplaceResource(fileMatch.resource());
this.modelService.getModel(replaceResource).setValue(editorModel.textEditorModel.getValue());
this.replaceService.replace(fileMatch, null, replaceResource);
}
});
} else {
let replaceResource = this.getReplaceResource(fileMatch.resource());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册