

def __close_preview(self, window):
    if (not self.SHOW_FILE_PREVIEW):
        return
    active_view = window.active_view()
    if (not self.current_view):
        return
    elif (self.current_view.id() != active_view.id()):
        self.debug('ID mismatch!')
        return
    elif (not self.is_transient_view(window, self.current_view)):
        self.debug("Last 'opened' view not transient")
        return
    active_view.debug(('Closing file: %s' % self.current_view.file_name()))
    window.run_command('close_file')
    self.current_view = None

dataset/ETHPy150Open FichteFoll/FileHistory/file_history.py FileHistory.__close_preview/VarMisuse@102/142 `self`->`active_view`