提交 11fa14a6 编写于 作者: B Benjamin Pasero

moveEditorToRightGroup should not attempt to move the editor when it's the...

moveEditorToRightGroup should not attempt to move the editor when it's the only editor in the group (fixes #9873)
上级 69729e73
......@@ -757,6 +757,12 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
}
private doMoveEditorAcrossGroups(input: EditorInput, fromGroup: EditorGroup, to: Position, index?: number): void {
if (fromGroup.count === 1) {
const toGroup = this.stacks.groupAt(to);
if (!toGroup && this.stacks.positionOfGroup(fromGroup) < to) {
return; // do nothing if the group to move only has one editor and is the last group already
}
}
// When moving an editor, try to preserve as much view state as possible by checking
// for th editor to be a text editor and creating the options accordingly if so
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册