Close all files opened to the right

def close_all_right(self):
        """ Close all files opened to the right """
        num = self.get_stack_index()
        n = self.get_stack_count()
        for i in range(num, n-1):
            self.close_file(num+1)