function _mergePanes() {
        if (_panes.hasOwnProperty(SECOND_PANE)) {

            var firstPane = _panes[FIRST_PANE],
                secondPane = _panes[SECOND_PANE],
                fileList = secondPane.getViewList(),
                lastViewed = getCurrentlyViewedFile();

            Resizer.removeSizable(firstPane.$el);
            firstPane.mergeFrom(secondPane);

            exports.trigger("workingSetRemoveList", fileList, secondPane.id);

            setActivePaneId(firstPane.id);

            secondPane.$el.off(".mainview");
            secondPane.off(".mainview");

            secondPane.destroy();
            delete _panes[SECOND_PANE];
            exports.trigger("paneDestroy", secondPane.id);
            exports.trigger("workingSetAddList", fileList, firstPane.id);

            _mruList.forEach(function (record) {
                if (record.paneId === secondPane.id) {
                    record.paneId = firstPane.id;
                }
            });

            _$el.removeClass("split-" + _orientation.toLowerCase());
            _orientation = null;
            // this will set the remaining pane to 100%
            _initialLayout();

            exports.trigger("paneLayoutChange", _orientation);

            // if the current view before the merger was in the pane
            //  that went away then reopen it so that it's now the current view again
            if (lastViewed && getCurrentlyViewedFile() !== lastViewed) {
                exports._open(firstPane.id, lastViewed);
            }
        }
    }
function _mergePanes() {
        if (_panes.hasOwnProperty(SECOND_PANE)) {

            var firstPane = _panes[FIRST_PANE],
                secondPane = _panes[SECOND_PANE],
                fileList = secondPane.getViewList(),
                lastViewed = getCurrentlyViewedFile();

            Resizer.removeSizable(firstPane.$el);
            firstPane.mergeFrom(secondPane);

            exports.trigger("workingSetRemoveList", fileList, secondPane.id);

            setActivePaneId(firstPane.id);

            secondPane.$el.off(".mainview");
            secondPane.off(".mainview");

            secondPane.destroy();
            delete _panes[SECOND_PANE];
            exports.trigger("paneDestroy", secondPane.id);
            exports.trigger("workingSetAddList", fileList, firstPane.id);

            _mruList.forEach(function (record) {
                if (record.paneId === secondPane.id) {
                    record.paneId = firstPane.id;
                }
            });

            _$el.removeClass("split-" + _orientation.toLowerCase());
            _orientation = null;
            // this will set the remaining pane to 100%
            _initialLayout();

            exports.trigger("paneLayoutChange", _orientation);

            // if the current view before the merger was in the pane
            //  that went away then reopen it so that it's now the current view again
            if (lastViewed && getCurrentlyViewedFile() !== lastViewed) {
                exports._open(firstPane.id, lastViewed);
            }
        }
    }
function _mergePanes ( ) { if ( _panes . hasOwnProperty ( SECOND_PANE ) ) { var firstPane = _panes [ FIRST_PANE ] , secondPane = _panes [ SECOND_PANE ] , fileList = secondPane . getViewList ( ) , lastViewed = getCurrentlyViewedFile ( ) ; Resizer . removeSizable ( firstPane . $el ) ; firstPane . mergeFrom ( secondPane ) ; exports . trigger ( "workingSetRemoveList" , fileList , secondPane . id ) ; setActivePaneId ( firstPane . id ) ; secondPane . $el . off ( ".mainview" ) ; secondPane . off ( ".mainview" ) ; secondPane . destroy ( ) ; delete _panes [ SECOND_PANE ] ; exports . trigger ( "paneDestroy" , secondPane . id ) ; exports . trigger ( "workingSetAddList" , fileList , firstPane . id ) ; _mruList . forEach ( function ( record ) { if ( record . paneId === secondPane . id ) { record . paneId = firstPane . id ; } } ) ; _$el . removeClass ( "split-" + _orientation . toLowerCase ( ) ) ; _orientation = null ; // this will set the remaining pane to 100% _initialLayout ( ) ; exports . trigger ( "paneLayoutChange" , _orientation ) ; // if the current view before the merger was in the pane //  that went away then reopen it so that it's now the current view again if ( lastViewed && getCurrentlyViewedFile ( ) !== lastViewed ) { exports . _open ( firstPane . id , lastViewed ) ; } } }
Merges second pane into first pane and opens the current file
@private
Merges second pane into first pane and opens the current file
merges the pane s content into the first pane