if (slices_[i].text())
return slices_[i];
- // This case is in principe not possible. We _must_
+ // This case is in principle not possible. We _must_
// be inside a Text.
LBUFERR(false);
// Squash warning
}
+#if 0
+// works, but currently not needed
+void DocIterator::backwardInset()
+{
+ backwardPos();
+
+ while (!empty() && !nextInset()) {
+ if (inTexted()) {
+ pos_type const lastp = lastpos();
+ Paragraph const & par = paragraph();
+ pos_type & pos = top().pos();
+ while (pos > 0 && (pos == lastp || !par.isInset(pos)))
+ --pos;
+ if (pos > 0)
+ break;
+ }
+ backwardPos();
+ }
+}
+#endif
+
+
bool DocIterator::hasPart(DocIterator const & it) const
{
// it can't be a part if it is larger
fixIfBroken();
break;
}
+ if ((inset->inMathed() && !inset->isActive())
+ || (!inset->inMathed() && !inset->editable())) {
+ LYXERR0("Inset found on cursor stack is not active.");
+ fixIfBroken();
+ break;
+ }
push_back(sl[i]);
top().inset_ = inset;
if (fixIfBroken())