]> git.lyx.org Git - features.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:37:51 +0000 (09:37 +0100)
The number of paragraphs can change here, so pit() can become invalid.

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

src/insets/InsetTabular.cpp

index 94eed7893eb231315f16bf8016733f56a4ff41fa..2037b76707110a6bf253539b2b80b2d4bf1d7c6b 100644 (file)
@@ -6174,6 +6174,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;