X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FDocIterator.cpp;h=425c6d6d5edc737e0726657a5e71e55b275cf217;hb=0a7705a6736a85c3c751f7b4e9998833cdb71fc9;hp=63e9e7be9968518096507a343eee3dd4e6d68c6e;hpb=694399b16c604d172a1441639e2309baf1afb7fc;p=lyx.git diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp index 63e9e7be99..425c6d6d5e 100644 --- a/src/DocIterator.cpp +++ b/src/DocIterator.cpp @@ -92,7 +92,8 @@ Inset * DocIterator::nextInset() const if (pos() == lastpos()) return 0; if (pos() > lastpos()) { - LYXERR0("Should not happen, but it does. "); + LYXERR0("Should not happen, but it does: pos() = " + << pos() << ", lastpos() = " << lastpos()); return 0; } if (inMathed()) @@ -110,7 +111,7 @@ Inset * DocIterator::prevInset() const if (cell().empty()) // FIXME: this should not happen but it does. // See bug 3189 - // http://bugzilla.lyx.org/show_bug.cgi?id=3189 + // http://www.lyx.org/trac/ticket/3189 return 0; else return prevAtom().nucleus(); @@ -249,12 +250,7 @@ MathData & DocIterator::cell() const Text * DocIterator::innerText() const { LASSERT(!empty(), /**/); - // go up until first non-0 text is hit - // (innermost text is 0 in mathed) - for (int i = depth() - 1; i >= 0; --i) - if (slices_[i].text()) - return slices_[i].text(); - return 0; + return innerTextSlice().text(); }