Skip to content

Commit

Permalink
Changing character casing in file name doesn't take effect in editor (f…
Browse files Browse the repository at this point in the history
…ix #100436)
  • Loading branch information
bpasero committed Jun 20, 2020
1 parent f17030d commit 59aad0d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/vs/workbench/common/editor/textResourceEditorInput.ts
Expand Up @@ -163,7 +163,7 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput {
return false;
}

async save(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise<IEditorInput | undefined> {
save(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise<IEditorInput | undefined> {
return this.doSave(group, options, false);
}

Expand All @@ -185,7 +185,12 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput {
return undefined; // save cancelled
}

return this.editorService.createEditorInput({ resource: target });
// If the target is a different resource, return with a new editor input
if (!extUri.isEqual(target, this.resource)) {
return this.editorService.createEditorInput({ resource: target });
}

return this;
}

async revert(group: GroupIdentifier, options?: IRevertOptions): Promise<void> {
Expand Down

0 comments on commit 59aad0d

Please sign in to comment.