[meld] undo: Ensure that each buffer has a starting checkpoint (#159)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] undo: Ensure that each buffer has a starting checkpoint (#159)
- Date: Sat, 10 Feb 2018 22:46:43 +0000 (UTC)
commit 09ecc4188626d48ed25f03287103d33e2082a375
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Feb 11 08:36:40 2018 +1000
undo: Ensure that each buffer has a starting checkpoint (#159)
With this change, clearing the undo sequence will still ensure that each
buffer starts with an undo checkpoint.
Previously, this was *almost* always the case, but on reload of an
individual file we would clear out the checkpoints for all files, and
only re-checkpoint the file we reloaded. This caused several weird
issues, chief among which was that you cause a file to show as being
changed (along with the action sensitivity issues accompanying this).
meld/undo.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/meld/undo.py b/meld/undo.py
index 691a7b17..7f224938 100644
--- a/meld/undo.py
+++ b/meld/undo.py
@@ -100,7 +100,10 @@ class UndoSequence(GObject.GObject):
self.emit('can-redo', 0)
self.actions = []
self.next_redo = 0
- self.checkpoints = {}
+ self.checkpoints = {
+ # Each buffer's checkpoint starts at zero and has no end
+ ref(): [0, None] for ref in self.buffer_refs
+ }
self.group = None
self.busy = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]