예제 #1
0
파일: history.py 프로젝트: jamesnvc/emacs.d
 def _perform_redos(self, count, task_handle):
     for i in range(count):
         self.current_change = self.redo_list[-1]
         try:
             job_set = change.create_job_set(task_handle, self.current_change)
             self.current_change.do(job_set)
         finally:
             self.current_change = None
         self.undo_list.append(self.redo_list.pop())
예제 #2
0
파일: history.py 프로젝트: climbus/rope
 def _perform_redos(self, count, task_handle):
     for i in range(count):
         self.current_change = self.redo_list[-1]
         try:
             job_set = change.create_job_set(task_handle,
                                             self.current_change)
             self.current_change.do(job_set)
         finally:
             self.current_change = None
         self.undo_list.append(self.redo_list.pop())
예제 #3
0
    def do(self, changes, task_handle=taskhandle.NullTaskHandle()):
        """Perform the change and add it to the `self.undo_list`

        Note that uninteresting changes (changes to ignored files)
        will not be appended to `self.undo_list`.

        """
        try:
            self.current_change = changes
            changes.do(change.create_job_set(task_handle, changes))
        finally:
            self.current_change = None
        if self._is_change_interesting(changes):
            self.undo_list.append(changes)
            self._remove_extra_items()
        del self.redo_list[:]
예제 #4
0
파일: history.py 프로젝트: climbus/rope
    def do(self, changes, task_handle=taskhandle.NullTaskHandle()):
        """Perform the change and add it to the `self.undo_list`

        Note that uninteresting changes (changes to ignored files)
        will not be appended to `self.undo_list`.

        """
        try:
            self.current_change = changes
            changes.do(change.create_job_set(task_handle, changes))
        finally:
            self.current_change = None
        if self._is_change_interesting(changes):
            self.undo_list.append(changes)
            self._remove_extra_items()
        del self.redo_list[:]