]> git.lyx.org Git - lyx.git/commitdiff
Reset cur.pit() when pasting into tables.
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 8 Feb 2018 18:06:35 +0000 (19:06 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 9 Feb 2018 08:55:28 +0000 (09:55 +0100)
The number of paragraphs can change here, so pit() can become invalid.

Fixes: #9983
(cherry picked from commit 6e4e0869006aa4c225162164aaa14a70d041facf)

src/insets/InsetTabular.cpp
status.22x

index 2be01bde722164d523f6d589b64af586d6f1ad4d..08e6f5e7fad9f1fa53dee0ad7a99b2007687a2cf 100644 (file)
@@ -6182,6 +6182,7 @@ bool InsetTabular::pasteClipboard(Cursor & cur)
                        inset->setChange(Change(buffer().params().track_changes ?
                                                Change::INSERTED : Change::UNCHANGED));
                        cur.pos() = 0;
+                       cur.pit() = 0;
                }
        }
        return true;
index 4cf4c24938962384c23648eb2d1f685aff59ac7d..6ac16cb5ecc58c66d08037764c7c69e5d73d67f5 100644 (file)
@@ -92,6 +92,9 @@ What's new
 - Fix crash when closing master with children and grandchildren
   (bug 10766).
 
+- Fix crash when pasting multiple cells into a multi-paragraph cell of
+  a table (bug 9983).
+
 - Fix random crash when dissolving inset (bug 10667).
 
 - Fix potential crash when cursor enters an inset (bug 10691).