File tree Expand file tree Collapse file tree
src/vs/workbench/common/editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput {
163163 return false ;
164164 }
165165
166- async save ( group : GroupIdentifier , options ?: ITextFileSaveOptions ) : Promise < IEditorInput | undefined > {
166+ save ( group : GroupIdentifier , options ?: ITextFileSaveOptions ) : Promise < IEditorInput | undefined > {
167167 return this . doSave ( group , options , false ) ;
168168 }
169169
@@ -185,7 +185,12 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput {
185185 return undefined ; // save cancelled
186186 }
187187
188- return this . editorService . createEditorInput ( { resource : target } ) ;
188+ // If the target is a different resource, return with a new editor input
189+ if ( ! extUri . isEqual ( target , this . resource ) ) {
190+ return this . editorService . createEditorInput ( { resource : target } ) ;
191+ }
192+
193+ return this ;
189194 }
190195
191196 async revert ( group : GroupIdentifier , options ?: IRevertOptions ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments