Skip to content

Commit 59aad0d

Browse files
author
Benjamin Pasero
committed
Changing character casing in file name doesn't take effect in editor (fix microsoft#100436)
1 parent f17030d commit 59aad0d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/vs/workbench/common/editor/textResourceEditorInput.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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> {

0 commit comments

Comments
 (0)