From f8a46c487427889dd940c169da08b1717bddc45d Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 17 Sep 2012 11:24:39 +0200 Subject: [PATCH] Fix bug #8342: Endless undo group messages Fix thinko in Undo::endUndoGroup. Do not reset undo groups in Undo::clean The underlying problem remains: the various VC functions should not always reload the buffer or at least should use the parameter clearUndo=false. --- src/Undo.cpp | 10 +++++++--- status.20x | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Undo.cpp b/src/Undo.cpp index 28438c10f3..9960309d8f 100644 --- a/src/Undo.cpp +++ b/src/Undo.cpp @@ -249,8 +249,10 @@ void Undo::clear() d->undostack_.clear(); d->redostack_.clear(); d->undo_finished_ = true; - d->group_id = 0; - d->group_level = 0; + // We used to do that, but I believe it is better to keep + // groups (only used in Buffer::reload for now (JMarc) + //d->group_id = 0; + //d->group_level = 0; } @@ -511,8 +513,10 @@ void Undo::beginUndoGroup() void Undo::endUndoGroup() { - if (d->group_level == 0) + if (d->group_level == 0) { LYXERR0("There is no undo group to end here"); + return; + } --d->group_level; if (d->group_level == 0) { // real end of the group diff --git a/status.20x b/status.20x index 83aefe6781..d7add587d7 100644 --- a/status.20x +++ b/status.20x @@ -130,6 +130,9 @@ What's new - Make sure that undo restores paragraph longest label width correctly (bug 8242). +- Fix undo machinery confusion after checking in a document under version + control (bug 8342). + - Do not forget the undo information when doing a Save As... - Replace current selection when pasting (bug 8027). -- 2.39.5