Reset cur.pit() when pasting into tables.

The number of paragraphs can change here, so pit() can become invalid.

Fixes: #9983
(cherry picked from commit 6e4e086900)
This commit is contained in:
Juergen Spitzmueller 2018-02-08 19:06:35 +01:00
parent 2d06255e20
commit 0c95259589
2 changed files with 4 additions and 0 deletions

View 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;

View 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).