If the reverse position corresponds to an inset, its paragraph id
does not follow the main text numbering. Typically, an inset has
only a few paragraph, so that we would jump near the beginning of
the document. In this way we at least jump at the beginning of the
inset.
DocIterator const dit = buffer_.getParFromID(tmpid);
if (dit == doc_iterator_end(&buffer_))
posvalid = false;
- else {
+ else if (dit.depth() > 1) {
+ // We are an inset.
+ setCursor(dit);
+ recenter();
+ return;
+ } else {
newpit = dit.pit();
// now have to check pos.
newpos = tmppos;