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

Jean-Marc Lasgouttes lasgouttes at lyx.org
Fri Feb 12 09:10:36 UTC 2021


commit 2079dc1b16f7eaaef497e51f9869cc8d88f214ea
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Thu Feb 11 16:58:28 2021 +0100

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

diff --git a/src/Text2.cpp b/src/Text2.cpp
index 60361f5..3a7ca6c 100644
--- a/src/Text2.cpp
+++ b/src/Text2.cpp
@@ -925,6 +925,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
diff --git a/status.23x b/status.23x
index 06850c5..0a9bbe4 100644
--- a/status.23x
+++ b/status.23x
@@ -78,6 +78,8 @@ What's new
 
 - Disable direct insertion of multiple spaces in mathed text (bug 1311).
 
+- Fix crash in tabular when an empty paragraph is removed
+  automatically (bug 12117).
 
 
 * INTERNALS


More information about the lyx-cvs mailing list