]> 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>
Thu, 8 Feb 2018 18:06:35 +0000 (19:06 +0100)
The number of paragraphs can change here, so pit() can become invalid.

Fixes: #9983
src/insets/InsetTabular.cpp

index bc0d0ae3c601b2702038f46b1d6af866ca057398..f9503c7124d8e23bff0629da8dbffb019d3d02ee 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;