[LyX/master] DEPM: do not fix cursor pit if it was in a different cell

Jean-Marc Lasgouttes lasgouttes at lyx.org
Wed Feb 10 09:19:30 UTC 2021


commit 939d25561d5345d367309b7994eaefa355072456
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Wed Feb 10 10:20:34 2021 +0100

    DEPM: do not fix cursor pit if it was in a different cell
    
    This bug has been here forever.
    
    Fixes bug #12117.
---
 src/Text2.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/Text2.cpp b/src/Text2.cpp
index f77bfaa..4959a3f 100644
--- a/src/Text2.cpp
+++ b/src/Text2.cpp
@@ -916,6 +916,7 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur,
 	if (cur.depth() >= old.depth()) {
 		CursorSlice & curslice = cur[old.depth() - 1];
 		if (&curslice.inset() == &old.inset()
+		    && curslice.idx() == old.idx()
 		    && curslice.pit() > old.pit()) {
 			--curslice.pit();
 			// since a paragraph has been deleted, all the


More information about the lyx-cvs mailing list