diff --git a/src/gui/widgets/undoablebuffer.py b/src/gui/widgets/undoablebuffer.py index 7093c2244..c8343056a 100644 --- a/src/gui/widgets/undoablebuffer.py +++ b/src/gui/widgets/undoablebuffer.py @@ -36,6 +36,7 @@ class Stack(list): """ Very simple stack implementation that cannot grow beyond an at init determined size. + Inherits from list. Only append checks if this is really the case! """ def __init__(self, stack_size=None): @@ -108,7 +109,7 @@ class UndoableBuffer(gtk.TextBuffer): def can_redo(self): return bool(self.redo_stack) - def __empty_redo_stack(self): + def _empty_redo_stack(self): self.redo_stack = [] def on_insert_text_undoable(self, textbuffer, text_iter, text, length): @@ -131,7 +132,7 @@ class UndoableBuffer(gtk.TextBuffer): return True if not self.undo_in_progress: - self.__empty_redo_stack() + self._empty_redo_stack() if self.not_undoable_action: return undo_action = self.insertclass(text_iter, text, length, textbuffer) @@ -177,7 +178,7 @@ class UndoableBuffer(gtk.TextBuffer): return True if not self.undo_in_progress: - self.__empty_redo_stack() + self._empty_redo_stack() if self.not_undoable_action: return undo_action = self.deleteclass(text_buffer, start_iter, end_iter) diff --git a/src/gui/widgets/undoablestyledbuffer.py b/src/gui/widgets/undoablestyledbuffer.py index 4e2401e6e..53a177c10 100644 --- a/src/gui/widgets/undoablestyledbuffer.py +++ b/src/gui/widgets/undoablestyledbuffer.py @@ -96,7 +96,7 @@ class UndoableStyledBuffer(StyledTextBuffer): def on_tag_insert_undoable(self, buffer, tag, start, end): if not self.undo_in_progress: - self.__empty_redo_stack() + self._empty_redo_stack() if self.not_undoable_action: return if end.get_offset() - start.get_offset() == 1: