提交 b0f3e950 编写于 作者: B Benjamin Pasero

pin an editor opened to the side via Cmd+2 or Cmd+3

上级 a4988ea0
...@@ -220,7 +220,10 @@ export abstract class BaseFocusSideGroupAction extends Action { ...@@ -220,7 +220,10 @@ export abstract class BaseFocusSideGroupAction extends Action {
let options: EditorOptions; let options: EditorOptions;
if (referenceEditor instanceof BaseTextEditor) { if (referenceEditor instanceof BaseTextEditor) {
options = new TextEditorOptions(); options = new TextEditorOptions();
options.pinned = true;
(<TextEditorOptions>options).viewState(referenceEditor.getControl().saveViewState()); (<TextEditorOptions>options).viewState(referenceEditor.getControl().saveViewState());
} else {
options = EditorOptions.create({ pinned: true });
} }
return this.editorService.openEditor(referenceEditor.input, options, this.getTargetEditorSide()); return this.editorService.openEditor(referenceEditor.input, options, this.getTargetEditorSide());
...@@ -233,7 +236,7 @@ export abstract class BaseFocusSideGroupAction extends Action { ...@@ -233,7 +236,7 @@ export abstract class BaseFocusSideGroupAction extends Action {
// For now only support to open files from history to the side // For now only support to open files from history to the side
if (!!getUntitledOrFileResource(input)) { if (!!getUntitledOrFileResource(input)) {
return this.editorService.openEditor(input, null, this.getTargetEditorSide()); return this.editorService.openEditor(input, EditorOptions.create({ pinned: true }), this.getTargetEditorSide());
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册