@@ -139,7 +139,16 @@ define(function (require, exports, module) {
139139 // this populates the working sets
140140 getAllFilesFromWorkingSet ( ) ;
141141
142- // make sure there is atleast one file in the first pane working set
142+ // if no files are present in a pane, we want to hide the tab bar for that pane
143+ if ( firstPaneWorkingSet . length === 0 ) {
144+ Helper . _hideTabBar ( $ ( '#phoenix-tab-bar' ) ) ;
145+ }
146+
147+ if ( secondPaneWorkingSet . length === 0 ) {
148+ Helper . _hideTabBar ( $ ( '#phoenix-tab-bar-2' ) ) ;
149+ }
150+
151+ // to add tabs one by one to the tab bar
143152 if ( firstPaneWorkingSet . length > 0 ) {
144153 for ( let i = 0 ; i < firstPaneWorkingSet . length ; i ++ ) {
145154 // Note: here we add the element to the tab bar directly and not the tab-container
@@ -159,7 +168,7 @@ define(function (require, exports, module) {
159168 * Creates the tab bar and adds it to the DOM
160169 */
161170 function createTabBar ( ) {
162- if ( ! Preference . tabBarEnabled || ! EditorManager . getActiveEditor ( ) ) {
171+ if ( ! Preference . tabBarEnabled ) {
163172 return ;
164173 }
165174
@@ -349,6 +358,3 @@ define(function (require, exports, module) {
349358 handleTabClick ( ) ;
350359 } ) ;
351360} ) ;
352-
353-
354- // TODO: Bug (when we have two panes and one pane gets empty by closing all files in it, the other pane tab bar also gets removed)
0 commit comments