File–>Settings–>Editor–>General–>Editor Tabs–>Closing Policy–>Tab Limit 默认值是10,大于该值后会自动关闭超出的窗口,根据使用情况设置。