]> git.lyx.org Git - lyx.git/commitdiff
DEPM: do not fix cursor pit if it was in a different cell
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 11 Feb 2021 15:58:28 +0000 (16:58 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 11 Feb 2021 16:01:09 +0000 (17:01 +0100)
This bug has been here forever.

Fixes bug #12117.

(cherry-picked from 939d25561d5345d367309b7994eaefa355072456)

src/Text2.cpp
status.23x

index 60361f5bc9341c2d1551aaba34911e14bc79422c..3a7ca6cd9d003da42dea70c87bf77eaa697960c2 100644 (file)
@@ -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
index 06850c5f556737c042d15f36254cbaa2e888b9b1..0a9bbe461389966ea9de8b0a3f3c79f9bf612c0d 100644 (file)
@@ -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