Join All Editor Groups should preserve which editor is active (fixes #54955)

This commit is contained in:
Benjamin Pasero 2018-08-08 17:46:26 +02:00
parent 8600035ba0
commit 2f69a93b9d

View file

@ -702,7 +702,7 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
// Move/Copy editors over into target
let index = (options && typeof options.index === 'number') ? options.index : targetView.count;
sourceView.editors.forEach(editor => {
const inactive = !sourceView.isActive(editor);
const inactive = !sourceView.isActive(editor) || this._activeGroup !== sourceView;
const copyOptions: ICopyEditorOptions = { index, inactive, preserveFocus: inactive };
if (options && options.mode === MergeGroupMode.COPY_EDITORS) {