#NEWLINE# @ click . command ( help = 'Navigate forward through the browser history.' ) #NEWLINE# def history_forward( ) : #NEWLINE# #INDENT# client = get_client ( ) #NEWLINE# history = get_history ( ) #NEWLINE# if history . is_at_most_recent : #NEWLINE# #INDENT# click . echo ( 'Currently at most recent point in history. Cannot navigate forward.' ) #NEWLINE# return #NEWLINE# #UNINDENT# ( doc , history ) = history . forward ( ) #NEWLINE# try : #NEWLINE# #INDENT# doc = client . reload ( doc ) #NEWLINE# #UNINDENT# except coreapi . exceptions . ErrorMessage as exc : #NEWLINE# #INDENT# click . echo ( display ( exc . error ) ) #NEWLINE# sys . exit ( 1 ) #NEWLINE# #UNINDENT# click . echo ( display ( doc ) ) #NEWLINE# if isinstance ( doc , coreapi . Document ) : #NEWLINE# #INDENT# set_document ( doc ) #NEWLINE# set_history ( history )