IDEA-252549 ui: honor FORBID_TAB_SPLIT flag while closing editors

GitOrigin-RevId: 183fdfe3b2c4c3bafe85d6673a1706596baac545
This commit is contained in:
Aleksey Pivovarov
2020-11-23 11:15:12 +00:00
committed by intellij-monorepo-bot
parent 71c0566a3e
commit e0c6a1312f
@@ -581,7 +581,7 @@ public class EditorsSplitters extends IdePanePanel implements UISettingsListener
for (EditorWindow window : windows) {
LOG.assertTrue(window.getSelectedEditor() != null);
window.closeFile(file, false, moveFocus);
if (window.getTabCount() == 0 && nextFile != null && isProjectOpen) {
if (window.getTabCount() == 0 && nextFile != null && isProjectOpen && !FileEditorManagerImpl.forbidSplitFor(nextFile)) {
EditorWithProviderComposite newComposite = myManager.newEditorComposite(nextFile);
window.setEditor(newComposite, moveFocus); // newComposite can be null
}