Skip to content

Commit

Permalink
just do schema === 'untitled'
Browse files Browse the repository at this point in the history
fixes #35083
  • Loading branch information
isidorn committed Sep 26, 2017
1 parent 3b4d210 commit 45cbd76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vs/workbench/parts/files/browser/fileActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ export abstract class BaseSaveOneFileAction extends BaseSaveFileAction {
source = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true });
}

if (source && (this.fileService.canHandleResource(source) || this.untitledEditorService.exists(source))) {
if (source && (this.fileService.canHandleResource(source) || source.scheme === 'untitled')) {

// Save As (or Save untitled with associated path)
if (this.isSaveAs() || source.scheme === 'untitled') {
Expand All @@ -1391,7 +1391,7 @@ export abstract class BaseSaveOneFileAction extends BaseSaveFileAction {
const editor = getCodeEditor(activeEditor);
if (editor) {
const activeResource = toResource(activeEditor.input, { supportSideBySide: true });
if (activeResource && (this.fileService.canHandleResource(activeResource) || this.untitledEditorService.exists(source)) && activeResource.toString() === source.toString()) {
if (activeResource && (this.fileService.canHandleResource(activeResource) || source.scheme === 'untitled') && activeResource.toString() === source.toString()) {
viewStateOfSource = editor.saveViewState();
}
}
Expand Down

0 comments on commit 45cbd76

Please sign in to comment.