commit aa1967b908727585b45f91829165a66e16128a1b
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Thu Oct 16 17:32:13 2025 +0200
Fixup f5bbadba: limit undo coalescing to simpler cases
The current code create crashes that seem to be caused by consecutive
undos with different ranges. Although the mechanism of the bug is not
clear, this patch limits undo coalescing to the case of undo actions
with the same form/end values.
See the discussion here:
https://marc.info/?l=lyx-devel&m=176055557402877&w=2
(cherry picked from commit 4dbabe6fa55f7b8582d48ef8180d0b7fb6fbcdfc)
---
src/Undo.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Undo.cpp b/src/Undo.cpp
index 3912bfa60f..69d85a7e5f 100644
--- a/src/Undo.cpp
+++ b/src/Undo.cpp
@@ -325,8 +325,8 @@ void Undo::Private::doRecordUndo(UndoKind kind,
&& !stack.top().bparams
&& samePar(stack.top().cell, cell)
//&& stack.top().kind == kind // needed?
- && stack.top().from <= from
- && stack.top().end >= end) {
+ && stack.top().from == from
+ && stack.top().end == end) {
LYXERR(Debug::UNDO, "Undo coalescing: skip entry");
return;
}
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs