]> git.lyx.org Git - lyx.git/blobdiff - src/dociterator.C
gnome build removal, gtk build fix
[lyx.git] / src / dociterator.C
index b4fd5c2218892b23fc26617c782ea0f2451d8137..74c5aa38a6b510c4f547c3a62e00fe3040151509 100644 (file)
@@ -382,8 +382,27 @@ void DocIterator::forwardPosNoDescend()
 void DocIterator::forwardPar()
 {
        forwardPos();
-       while (!empty() && (!inTexted() || pos() != 0))
+
+#if 0
+       DocIterator cmp(*this);
+#endif
+       
+       while (!empty() && (!inTexted() || pos() != 0)) {
+               if (inTexted()) {
+                       pos_type const lastp = lastpos();
+                       Paragraph const & par = paragraph();
+                       pos_type & pos = top().pos();
+                       while (pos < lastp && !par.isInset(pos))
+                               ++pos;
+               }
                forwardPos();
+       }
+
+#if 0
+       while (!cmp.empty() && (!cmp.inTexted() || cmp.pos() != 0))
+               cmp.forwardPos();
+       BOOST_ASSERT(cmp == *this);
+#endif
 }