[LyX/master] Use correct cursor when creating undo group
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Tue Aug 29 14:09:16 UTC 2023
commit d27f309905049a323ba2704559099b1f9bfd4756
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date: Tue Aug 29 17:23:22 2023 +0200
Use correct cursor when creating undo group
This affects where cursor will be after undo. In this case, we want
obviously the 'old' cursor.
Fixes bug #12874.
---
src/BufferView.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 28577f2..9ec5df3 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -2651,7 +2651,7 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
// Put anchor at the same position.
cur.resetAnchor();
- cur.beginUndoGroup();
+ old.beginUndoGroup();
// Try to dispatch to an non-editable inset near this position
// via the temp cursor. If the inset wishes to change the real
@@ -2673,7 +2673,7 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
cursor().fixIfBroken();
}
- cur.endUndoGroup();
+ old.endUndoGroup();
// Do we have a selection?
theSelection().haveSelection(cursor().selection());
More information about the lyx-cvs
mailing list