[meld] Fix save-after-undo in certain conditions (closes bgo#656292)



commit 5f94be6667f87d0166b6fad2686e454980becc63
Author: Julian Taylor <jtaylor debian googlemail com>
Date:   Sun Aug 14 07:03:45 2011 +1000

    Fix save-after-undo in certain conditions (closes bgo#656292)

 meld/undo.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/meld/undo.py b/meld/undo.py
index 31e948d..ccad9a9 100644
--- a/meld/undo.py
+++ b/meld/undo.py
@@ -179,7 +179,8 @@ class UndoSequence(gobject.GObject):
         while start > 0 and self.actions[start - 1].buffer != buf:
             start -= 1
         end = self.next_redo
-        while end < len(self.actions) and self.actions[end + 1].buffer != buf:
+        while end < len(self.actions) - 1 and \
+              self.actions[end + 1].buffer != buf:
             end += 1
         if end == len(self.actions):
             end = None



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]