src/extensions/default/NavigationAndHistory/main.js
function _handleWorkingSetMove(event, file, sourcePaneId, destinationPaneId) {
        // Check existing list for this doc path and source pane entry
        var index = _.findIndex(_mrofList, function (record) {
            return (record && record.file === file.fullPath && record.paneId === sourcePaneId);
        }), tIndex;
        // If an entry is found update the pane info
        if (index >= 0) {
            // But an entry with the target pane Id should not exist
            tIndex = _.findIndex(_mrofList, function (record) {
                return (record && record.file === file.fullPath && record.paneId === destinationPaneId);
            });
            if (tIndex === -1) {
                _mrofList[index].paneId = destinationPaneId;
            } else {
                // Remove this entry as it has been moved.
                _mrofList.splice(index, 1);
            }
        }
    }
function _handleWorkingSetMove(event, file, sourcePaneId, destinationPaneId) {
        // Check existing list for this doc path and source pane entry
        var index = _.findIndex(_mrofList, function (record) {
            return (record && record.file === file.fullPath && record.paneId === sourcePaneId);
        }), tIndex;
        // If an entry is found update the pane info
        if (index >= 0) {
            // But an entry with the target pane Id should not exist
            tIndex = _.findIndex(_mrofList, function (record) {
                return (record && record.file === file.fullPath && record.paneId === destinationPaneId);
            });
            if (tIndex === -1) {
                _mrofList[index].paneId = destinationPaneId;
            } else {
                // Remove this entry as it has been moved.
                _mrofList.splice(index, 1);
            }
        }
    }
function _handleWorkingSetMove ( event , file , sourcePaneId , destinationPaneId ) { // Check existing list for this doc path and source pane entry var index = _ . findIndex ( _mrofList , function ( record ) { return ( record && record . file === file . fullPath && record . paneId === sourcePaneId ) ; } ) , tIndex ; // If an entry is found update the pane info if ( index >= 0 ) { // But an entry with the target pane Id should not exist tIndex = _ . findIndex ( _mrofList , function ( record ) { return ( record && record . file === file . fullPath && record . paneId === destinationPaneId ) ; } ) ; if ( tIndex === - 1 ) { _mrofList [ index ] . paneId = destinationPaneId ; } else { // Remove this entry as it has been moved. _mrofList . splice ( index , 1 ) ; } } }
To update existing entry if a move has happened
To update existing entry if a move has happened