else if (bot_pit == tm.last().first + 1)
tm.newParMetricsDown();
- if (tm.has(bot_pit)) {
+ if (tm.contains(bot_pit)) {
ParagraphMetrics const & pm = tm.parMetrics(bot_pit);
BOOST_ASSERT(!pm.rows().empty());
// FIXME: smooth scrolling doesn't work in mathed.
if (d->inlineCompletionPos.fixIfBroken())
d->inlineCompletionPos = DocIterator();
+ if (d->anchor_pit_ >= npit)
+ // The anchor pit must have been deleted...
+ d->anchor_pit_ = npit - 1;
+
// Rebreak anchor paragraph.
tm.redoParagraph(d->anchor_pit_);
ParagraphMetrics & anchor_pm = tm.par_metrics_[d->anchor_pit_];
el = buf.errorList("Parse");
buffer_.undo().recordUndo(d->cursor_);
cap::pasteParagraphList(d->cursor_, buf.paragraphs(),
- buf.params().textClassPtr(), el);
+ buf.params().documentClassPtr(), el);
res = _("Document %1$s inserted.");
} else {
res = _("Could not insert document %1$s");
{
CursorSlice const & bot = dit.bottom();
TextMetrics const & tm = textMetrics(bot.text());
- if (!tm.has(bot.pit()))
+ if (!tm.contains(bot.pit()))
return Point(-1, -1);
Point p = coordOffset(dit, boundary); // offset from outer paragraph
// set update flags
if (changed) {
- if (singlePar && !(cur.disp_.update() | Update::Force))
+ if (singlePar && !(cur.disp_.update() & Update::Force))
cur.updateFlags(cur.disp_.update() | Update::SinglePar);
else
cur.updateFlags(cur.disp_.update() | Update::Force);