src/extensions/default/NavigationAndHistory/NavigationProvider.js
function _navigateForward() {
        var navFrame = jumpForwardStack.pop();
        
        if (!navFrame) {
            return;
        }
        
        // Check if the poped frame is the current active frame or doesn't have any valid marker information
        // if true, jump again
        if (navFrame === currentEditPos) {
            jumpBackwardStack.push(navFrame);
            _validateNavigationCmds();
            CommandManager.execute(NAVIGATION_JUMP_FWD);
            return;
        }
        
        // We will check for the file existence now, if it doesn't exist we will jump back again
        // but discard the popped frame as invalid.
        _validateFrame(navFrame).done(function () {
            jumpBackwardStack.push(navFrame);
            navFrame.goTo();
            currentEditPos = navFrame;
        }).fail(function () {
            _validateNavigationCmds();
            CommandManager.execute(NAVIGATION_JUMP_FWD);
        }).always(function () {
            _validateNavigationCmds();
        });
        
    }
function _navigateForward() {
        var navFrame = jumpForwardStack.pop();
        
        if (!navFrame) {
            return;
        }
        
        // Check if the poped frame is the current active frame or doesn't have any valid marker information
        // if true, jump again
        if (navFrame === currentEditPos) {
            jumpBackwardStack.push(navFrame);
            _validateNavigationCmds();
            CommandManager.execute(NAVIGATION_JUMP_FWD);
            return;
        }
        
        // We will check for the file existence now, if it doesn't exist we will jump back again
        // but discard the popped frame as invalid.
        _validateFrame(navFrame).done(function () {
            jumpBackwardStack.push(navFrame);
            navFrame.goTo();
            currentEditPos = navFrame;
        }).fail(function () {
            _validateNavigationCmds();
            CommandManager.execute(NAVIGATION_JUMP_FWD);
        }).always(function () {
            _validateNavigationCmds();
        });
        
    }
function _navigateForward ( ) { var navFrame = jumpForwardStack . pop ( ) ; if ( ! navFrame ) { return ; } // Check if the poped frame is the current active frame or doesn't have any valid marker information // if true, jump again if ( navFrame === currentEditPos ) { jumpBackwardStack . push ( navFrame ) ; _validateNavigationCmds ( ) ; CommandManager . execute ( NAVIGATION_JUMP_FWD ) ; return ; } // We will check for the file existence now, if it doesn't exist we will jump back again // but discard the popped frame as invalid. _validateFrame ( navFrame ) . done ( function ( ) { jumpBackwardStack . push ( navFrame ) ; navFrame . goTo ( ) ; currentEditPos = navFrame ; } ) . fail ( function ( ) { _validateNavigationCmds ( ) ; CommandManager . execute ( NAVIGATION_JUMP_FWD ) ; } ) . always ( function ( ) { _validateNavigationCmds ( ) ; } ) ; }
Command handler to navigate forward
Command handler to navigate forward