Skip to content

Commit

Permalink
fix #86500 (#86577)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Dec 9, 2019
1 parent 87c2e0b commit 2722018
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/vs/workbench/services/editor/browser/editorService.ts
Expand Up @@ -5,7 +5,7 @@

import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { IResourceInput, ITextEditorOptions, IEditorOptions, EditorActivation } from 'vs/platform/editor/common/editor';
import { IEditorInput, IEditor, GroupIdentifier, IFileEditorInput, IUntitledTextResourceInput, IResourceDiffInput, IResourceSideBySideInput, IEditorInputFactoryRegistry, Extensions as EditorExtensions, IFileInputFactory, EditorInput, SideBySideEditorInput, IEditorInputWithOptions, isEditorInputWithOptions, EditorOptions, TextEditorOptions, IEditorIdentifier, IEditorCloseEvent, ITextEditor, ITextDiffEditor, ITextSideBySideEditor, toResource, SideBySideEditor, IRevertOptions } from 'vs/workbench/common/editor';
import { IEditorInput, IEditor, GroupIdentifier, IFileEditorInput, IUntitledTextResourceInput, IResourceDiffInput, IResourceSideBySideInput, IEditorInputFactoryRegistry, Extensions as EditorExtensions, IFileInputFactory, EditorInput, SideBySideEditorInput, IEditorInputWithOptions, isEditorInputWithOptions, EditorOptions, TextEditorOptions, IEditorIdentifier, IEditorCloseEvent, ITextEditor, ITextDiffEditor, ITextSideBySideEditor, toResource, SideBySideEditor, IRevertOptions, SaveReason } from 'vs/workbench/common/editor';
import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput';
import { Registry } from 'vs/platform/registry/common/platform';
import { ResourceMap } from 'vs/base/common/map';
Expand Down Expand Up @@ -687,8 +687,10 @@ export class EditorService extends Disposable implements EditorServiceImpl {
// Editors to save in parallel
await Promise.all(editorsToSaveParallel.map(({ groupId, editor }) => {

// Use save as a hint to pin the editor
this.editorGroupService.getGroup(groupId)?.pinEditor(editor);
// Use save as a hint to pin the editor if used explicitly
if (options?.reason === SaveReason.EXPLICIT) {
this.editorGroupService.getGroup(groupId)?.pinEditor(editor);
}

// Save
return editor.save(groupId, options);
Expand Down

0 comments on commit 2722018

Please sign in to comment.