

def preview_history(self, window, history_entry):
    'Preview the file if it exists, otherwise show the previous view (aka the "calling_view")'
    self.current_history_entry = history_entry
    self.__track_calling_view(window)
    if (not self.SHOW_FILE_PREVIEW):
        return
    filepath = history_entry['filename']
    if os.path.exists(filepath):
        invoke_async((lambda : self.__open_preview(window, filepath)), 0)
    else:
        self.__close_preview(window)
        self.__remove(self.get_current_project_key(), filepath)
        self.__save_history()

dataset/ETHPy150Open FichteFoll/FileHistory/file_history.py FileHistory.preview_history/original