提交 e2f17d96 编写于 作者: M Matt Bierner

Use basename as fallback for untitled resources

上级 30395fee
......@@ -15,6 +15,7 @@ import { UntitledEditorModel } from 'vs/workbench/common/editor/untitledEditorMo
import { Schemas } from 'vs/base/common/network';
import { Disposable } from 'vs/base/common/lifecycle';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { basename } from 'vs/base/common/resources';
export const IUntitledEditorService = createDecorator<IUntitledEditorService>('untitledEditorService');
......@@ -269,7 +270,7 @@ export class UntitledEditorService extends Disposable implements IUntitledEditor
suggestFileName(resource: URI): string {
const input = this.get(resource);
return input ? input.suggestFileName() : 'untitled';
return input ? input.suggestFileName() : basename(resource);
}
getEncoding(resource: URI): string | undefined {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册